Skip to content

Commit

Permalink
vim-patch:a7229c8: runtime(rmd,rrst): 'fex' option not properly restored
Browse files Browse the repository at this point in the history
Add 'fex' to b:undo_ftplugin variable

closes: vim/vim#15728

vim/vim@a7229c8

Co-authored-by: John M Devin <[email protected]>
  • Loading branch information
clason and jmdevin committed Sep 24, 2024
1 parent d831392 commit 2276743
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions runtime/ftplugin/rmd.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
" Maintainer: This runtime file is looking for a new maintainer.
" Former Maintainer: Jakson Alves de Aquino <[email protected]>
" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: 2024 Feb 28 by Vim Project
" Last Change:
" 2024 Feb 28 by Vim Project
" 2024 Sep 23 by Vim Project: properly restore fex option
" Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann)

" Only do this when not yet done for this buffer
Expand Down Expand Up @@ -74,9 +76,9 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
endif

if exists('b:undo_ftplugin')
let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< fex< | unlet! b:browsefilter"
else
let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
let b:undo_ftplugin = "setl cms< com< fo< flp< isk< fex< | unlet! b:browsefilter"
endif

let &cpo = s:cpo_save
Expand Down
8 changes: 5 additions & 3 deletions runtime/ftplugin/rrst.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
" Maintainer: This runtime file is looking for a new maintainer.
" Former Maintainer: Jakson Alves de Aquino <[email protected]>
" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: 2024 Feb 28 by Vim Project
" Last Change:
" 2024 Feb 28 by Vim Project
" 2024 Sep 23 by Vim Project: properly restore fex option
" Original work by Alex Zvoleff

" Only do this when not yet done for this buffer
Expand Down Expand Up @@ -48,9 +50,9 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
endif

if exists('b:undo_ftplugin')
let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< fex< | unlet! b:browsefilter"
else
let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
let b:undo_ftplugin = "setl cms< com< fo< flp< isk< fex< | unlet! b:browsefilter"
endif

let &cpo = s:cpo_save
Expand Down

0 comments on commit 2276743

Please sign in to comment.