To: vim_dev@googlegroups.com Subject: Patch 8.0.1547 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1547 Problem: Undo in the options window makes it empty. Solution: Set 'undolevels' while filling the buffer. (Yasuhiro Matthew, closes #2645) Files: runtime/optwin.vim *** ../vim-8.0.1546/runtime/optwin.vim 2018-01-31 21:48:25.224668815 +0100 --- runtime/optwin.vim 2018-02-27 17:00:22.606663899 +0100 *************** *** 1,7 **** " These commands create the option window. " " Maintainer: Bram Moolenaar ! " Last Change: 2017 Nov 21 " If there already is an option window, jump to that one. let buf = bufnr('option-window') --- 1,7 ---- " These commands create the option window. " " Maintainer: Bram Moolenaar ! " Last Change: 2018 Feb 27 " If there already is an option window, jump to that one. let buf = bufnr('option-window') *************** *** 122,132 **** endfun " Reset 'title' and 'icon' to make it work faster. let s:old_title = &title let s:old_icon = &icon let s:old_sc = &sc let s:old_ru = &ru ! set notitle noicon nosc noru " If the current window is a help window, try finding a non-help window. " Relies on syntax highlighting to be switched on. --- 122,134 ---- endfun " Reset 'title' and 'icon' to make it work faster. + " Reset 'undolevels' to avoid undo'ing until the buffer is empty. let s:old_title = &title let s:old_icon = &icon let s:old_sc = &sc let s:old_ru = &ru ! let s:old_ul = &ul ! set notitle noicon nosc noru ul=-1 " If the current window is a help window, try finding a non-help window. " Relies on syntax highlighting to be switched on. *************** *** 756,762 **** call Header("editing text") call append("$", "undolevels\tmaximum number of changes that can be undone") call append("$", "\t(global or local to buffer)") ! call append("$", " \tset ul=" . &ul) call append("$", "undofile\tautomatically save and restore undo history") call BinOptionG("udf", &udf) call append("$", "undodir\tlist of directories for undo files") --- 758,764 ---- call Header("editing text") call append("$", "undolevels\tmaximum number of changes that can be undone") call append("$", "\t(global or local to buffer)") ! call append("$", " \tset ul=" . s:old_ul) call append("$", "undofile\tautomatically save and restore undo history") call BinOptionG("udf", &udf) call append("$", "undodir\tlist of directories for undo files") *************** *** 802,807 **** --- 804,811 ---- call OptionG("cot", &cot) call append("$", "pumheight\tmaximum height of the popup menu") call OptionG("ph", &ph) + call append("$", "pumwidth\tminimum width of the popup menu") + call OptionG("pw", &pw) call append("$", "completefunc\tuser defined function for Insert mode completion") call append("$", "\t(local to buffer)") call OptionL("cfu") *************** *** 1436,1441 **** let &ru = s:old_ru let &sc = s:old_sc let &cpo = s:cpo_save ! unlet s:old_title s:old_icon s:old_ru s:old_sc s:cpo_save s:idx s:lnum " vim: ts=8 sw=2 sts=2 --- 1440,1446 ---- let &ru = s:old_ru let &sc = s:old_sc let &cpo = s:cpo_save ! let &ul = s:old_ul ! unlet s:old_title s:old_icon s:old_ru s:old_sc s:cpo_save s:idx s:lnum s:old_ul " vim: ts=8 sw=2 sts=2 *** ../vim-8.0.1546/src/version.c 2018-02-27 16:29:24.437343097 +0100 --- src/version.c 2018-02-27 17:02:26.053952821 +0100 *************** *** 780,781 **** --- 780,783 ---- { /* Add new patch number below this line */ + /**/ + 1547, /**/ -- Why is "abbreviation" such a long word? /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///