Mercurial > vim
comparison src/ex_docmd.c @ 17746:a4e488a6655c v8.1.1870
patch 8.1.1870: using :pedit from a help file sets help filetype
commit https://github.com/vim/vim/commit/026587b35c42301bcc2214207346b62ef2efed41
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 17 15:08:00 2019 +0200
patch 8.1.1870: using :pedit from a help file sets help filetype
Problem: Using :pedit from a help file sets the preview window to help
filetype. (Wang Shidong)
Solution: Do not set "keep_help_flag". (closes #3536)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 17 Aug 2019 15:15:03 +0200 |
parents | 4a3dca734d36 |
children | c75da1064e33 |
comparison
equal
deleted
inserted
replaced
17745:de48c18b7d1b | 17746:a4e488a6655c |
---|---|
8610 static void | 8610 static void |
8611 ex_pedit(exarg_T *eap) | 8611 ex_pedit(exarg_T *eap) |
8612 { | 8612 { |
8613 win_T *curwin_save = curwin; | 8613 win_T *curwin_save = curwin; |
8614 | 8614 |
8615 // Open the preview window or popup and make it the current window. | |
8615 g_do_tagpreview = p_pvh; | 8616 g_do_tagpreview = p_pvh; |
8616 prepare_tagpreview(TRUE); | 8617 prepare_tagpreview(TRUE); |
8617 | 8618 |
8618 keep_help_flag = bt_help(curwin_save->w_buffer); | 8619 // Edit the file. |
8619 do_exedit(eap, NULL); | 8620 do_exedit(eap, NULL); |
8620 keep_help_flag = FALSE; | |
8621 | 8621 |
8622 if (curwin != curwin_save && win_valid(curwin_save)) | 8622 if (curwin != curwin_save && win_valid(curwin_save)) |
8623 { | 8623 { |
8624 /* Return cursor to where we were */ | 8624 // Return cursor to where we were |
8625 validate_cursor(); | 8625 validate_cursor(); |
8626 redraw_later(VALID); | 8626 redraw_later(VALID); |
8627 win_enter(curwin_save, TRUE); | 8627 win_enter(curwin_save, TRUE); |
8628 } | 8628 } |
8629 # ifdef FEAT_TEXT_PROP | 8629 # ifdef FEAT_TEXT_PROP |