diff --git a/READMEdir/README_os390.txt b/READMEdir/README_os390.txt index 24c668c17d..8aa33ae880 100644 --- a/READMEdir/README_os390.txt +++ b/READMEdir/README_os390.txt @@ -1,4 +1,4 @@ -README_zOS.txt for version 8.1 of Vim: Vi IMproved. +README_os390.txt for version 8.1 of Vim: Vi IMproved. This readme explains how to build Vim on z/OS. Formerly called OS/390. See "README.txt" for general information about Vim. diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 621e3edbe2..e004010f3e 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -864,6 +864,9 @@ OptionSet After setting an option. The pattern is plugin. You can always use `:noa` to prevent triggering this autocommand. + When using |:set| in the autocommand the event + is not triggered again. + *QuickFixCmdPre* QuickFixCmdPre Before a quickfix command is run (|:make|, |:lmake|, |:grep|, |:lgrep|, |:grepadd|, diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index bbf0b2bdec..d355be3d0e 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -708,6 +708,7 @@ The flags that you can use for the substitute commands: search pattern. {not in Vi: highlighting of the match, other responses than 'y' or 'n'} + *:s_e* [e] When the search pattern fails, do not issue an error message and, in particular, continue in maps as if no error occurred. This is most useful to prevent the "No match" error from breaking a mapping. Vim @@ -719,6 +720,7 @@ The flags that you can use for the substitute commands: Interrupted {not in Vi} + *:s_g* [g] Replace all occurrences in the line. Without this argument, replacement occurs only for the first occurrence in each line. If the 'edcompatible' option is on, Vim remembers this flag and toggles @@ -726,26 +728,30 @@ The flags that you can use for the substitute commands: pattern. If the 'gdefault' option is on, this flag is on by default and the [g] argument switches it off. + *:s_i* [i] Ignore case for the pattern. The 'ignorecase' and 'smartcase' options are not used. {not in Vi} + *:s_I* [I] Don't ignore case for the pattern. The 'ignorecase' and 'smartcase' options are not used. {not in Vi} + *:s_n* [n] Report the number of matches, do not actually substitute. The [c] flag is ignored. The matches are reported as if 'report' is zero. Useful to |count-items|. If \= |sub-replace-expression| is used, the expression will be evaluated in the |sandbox| at every match. -[p] Print the line containing the last substitute. +[p] Print the line containing the last substitute. *:s_p* -[#] Like [p] and prepend the line number. +[#] Like [p] and prepend the line number. *:s_#* -[l] Like [p] but print the text like |:list|. +[l] Like [p] but print the text like |:list|. *:s_l* + *:s_r* [r] Only useful in combination with `:&` or `:s` without arguments. `:&r` works the same way as `:~`: When the search pattern is empty, use the previously used search pattern instead of the search pattern from the diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 15d46bc32b..1c482e90e1 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2022,8 +2022,10 @@ abs({expr}) Float or Number absolute value of {expr} acos({expr}) Float arc cosine of {expr} add({list}, {item}) List append {item} to |List| {list} and({expr}, {expr}) Number bitwise AND -append({lnum}, {string}) Number append {string} below line {lnum} -append({lnum}, {list}) Number append lines {list} below line {lnum} +append({lnum}, {text}) Number append {text} below line {lnum} +appendbufline({expr}, {lnum}, {text}) + Number append {text} below line {lnum} + in buffer {expr} argc() Number number of files in the argument list argidx() Number current index in the argument list arglistid([{winnr} [, {tabnr}]]) Number argument list id @@ -2108,8 +2110,8 @@ confirm({msg} [, {choices} [, {default} [, {type}]]]) copy({expr}) any make a shallow copy of {expr} cos({expr}) Float cosine of {expr} cosh({expr}) Float hyperbolic cosine of {expr} -count({list}, {expr} [, {ic} [, {start}]]) - Number count how many {expr} are in {list} +count({comp}, {expr} [, {ic} [, {start}]]) + Number count how many {expr} are in {comp} cscope_connection([{num}, {dbpath} [, {prepend}]]) Number checks existence of cscope connection cursor({lnum}, {col} [, {off}]) @@ -2331,7 +2333,6 @@ remote_read({serverid} [, {timeout}]) remote_send({server}, {string} [, {idvar}]) String send key sequence remote_startserver({name}) none become server {name} - String send key sequence remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list} remove({dict}, {key}) any remove entry {key} from {dict} rename({from}, {to}) Number rename (move) file from {from} to {to} @@ -2356,8 +2357,8 @@ searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]]) server2client({clientid}, {string}) Number send reply string serverlist() String get a list of available servers -setbufline({expr}, {lnum}, {line}) - Number set line {lnum} to {line} in buffer +setbufline({expr}, {lnum}, {text}) + Number set line {lnum} to {text} in buffer {expr} setbufvar({expr}, {varname}, {val}) none set {varname} in buffer {expr} to {val} @@ -2465,7 +2466,7 @@ term_wait({buf} [, {time}]) Number wait for screen to be updated test_alloc_fail({id}, {countdown}, {repeat}) none make memory allocation fail test_autochdir() none enable 'autochdir' during startup -test_feedinput() none add key sequence to input buffer +test_feedinput({string}) none add key sequence to input buffer test_garbagecollect_now() none free memory right now for testing test_ignore_error({expr}) none ignore a specific error test_null_channel() Channel null value for testing @@ -2567,10 +2568,10 @@ and({expr}, {expr}) *and()* :let flag = and(bits, 0x80) -append({lnum}, {expr}) *append()* - When {expr} is a |List|: Append each item of the |List| as a +append({lnum}, {text}) *append()* + When {text} is a |List|: Append each item of the |List| as a text line below line {lnum} in the current buffer. - Otherwise append {expr} as one text line below line {lnum} in + Otherwise append {text} as one text line below line {lnum} in the current buffer. {lnum} can be zero to insert a line before the first one. Returns 1 for failure ({lnum} out of range or out of memory), @@ -2800,15 +2801,15 @@ balloon_show({expr}) *balloon_show()* When showing a balloon is not possible nothing happens, no error message. - {only available when compiled with the +balloon_eval or - +balloon_eval_term feature} + {only available when compiled with the |+balloon_eval| or + |+balloon_eval_term| feature} balloon_split({msg}) *balloon_split()* Split {msg} into lines to be displayed in a balloon. The splits are made for the current window size and optimize to show debugger output. Returns a |List| with the split lines. - {only available when compiled with the +balloon_eval_term + {only available when compiled with the |+balloon_eval_term| feature} *browse()* @@ -3549,7 +3550,7 @@ deletebufline({expr}, {first} [, {last}]) *deletebufline()* For the use of {expr}, see |bufname()| above. - {first} and {last} are used like with |setline()|. Note that + {first} and {last} are used like with |getline()|. Note that when using |line()| this refers to the current buffer. Use "$" to refer to the last line in buffer {expr}. @@ -4504,6 +4505,8 @@ getcmdline() *getcmdline()* Example: > :cmap eescape(getcmdline(), ' \') < Also see |getcmdtype()|, |getcmdpos()| and |setcmdpos()|. + Returns an empty string when entering a password or using + |inputsecret()|. getcmdpos() *getcmdpos()* Return the position of the cursor in the command line as a @@ -8027,11 +8030,11 @@ substitute({expr}, {pat}, {sub}, {flags}) *substitute()* swapinfo({fname}) *swapinfo()* The result is a dictionary, which holds information about the swapfile {fname}. The available fields are: - version VIM version + version Vim version user user name host host name fname original file name - pid PID of the VIM process that created the swap + pid PID of the Vim process that created the swap file mtime last modification time in seconds inode Optional: INODE number of the file @@ -8131,7 +8134,7 @@ synconcealed({lnum}, {col}) *synconcealed()* concealable region if there are two consecutive regions with the same replacement character. For an example, if the text is "123456" and both "23" and "45" are concealed - and replace by the character "X", then: + and replaced by the character "X", then: call returns ~ synconcealed(lnum, 1) [0, '', 0] synconcealed(lnum, 2) [1, 'X', 1] @@ -8359,7 +8362,7 @@ term_dumpdiff({filename}, {filename} [, {options}]) The top part of the buffer contains the contents of the first file, the bottom part of the buffer contains the contents of the second file. The middle part shows the differences. - The parts are separated by a line of dashes. + The parts are separated by a line of equals. If the {options} argument is present, it must be a Dict with these possible members: @@ -8452,8 +8455,8 @@ term_getcursor({buf}) *term_getcursor()* "dict" can have these members: "visible" one when the cursor is visible, zero when it is hidden. - "blink" one when the cursor is visible, zero when it - is hidden. + "blink" one when the cursor is blinking, zero when it + is not blinking. "shape" 1 for a block cursor, 2 for underline and 3 for a vertical bar. @@ -8485,7 +8488,7 @@ term_getscrolled({buf}) *term_getscrolled()* used for |term_getline()| and |getline()|, so that: > term_getline(buf, N) < is equal to: > - `getline(N + term_getscrolled(buf)) + getline(N + term_getscrolled(buf)) < (if that line exists). {buf} is used as with |term_getsize()|. diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index a93f3cbb46..86d9ac2615 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -60,9 +60,10 @@ Example: > endfunction To see what version of Python you have: > - :python import sys :python print(sys.version) +There is no need to import sys, it's done by default. + Note: Python is very sensitive to the indenting. Make sure the "class" line and "EOF" do not have any indent. @@ -110,7 +111,6 @@ Python commands cannot be used in the |sandbox|. To pass arguments you need to set sys.argv[] explicitly. Example: > - :python import sys :python sys.argv = ["foo", "bar"] :pyfile myscript.py diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index d6dbd5032f..64d0ea1e3e 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -371,8 +371,9 @@ job running in the terminal. See |terminal-typing|. *omap-info* Operator-pending mappings can be used to define a movement command that can be -used with any operator. Simple example: ":omap { w" makes "y{" work like "yw" -and "d{" like "dw". +used with any operator. Simple example: > + :omap { w +makes "y{" work like "yw" and "d{" like "dw". To ignore the starting cursor position and select different text, you can have the omap start Visual mode to select the text to be operated upon. Example @@ -383,9 +384,11 @@ Normal mode commands find the first '(' character and select the first word before it. That usually is the function name. To enter a mapping for Normal and Visual mode, but not Operator-pending mode, -first define it for all three modes, then unmap it for Operator-pending mode: +first define it for all three modes, then unmap it for +Operator-pending mode: > :map xx something-difficult :ounmap xx + Likewise for a mapping for Visual and Operator-pending mode or Normal and Operator-pending mode. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 16c85d9307..ca0d917cca 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -120,10 +120,10 @@ and the following arguments will be ignored. When 'verbose' is non-zero, displaying an option value will also tell where it was last set. Example: > :verbose set shiftwidth cindent? -< shiftwidth=4 ~ - Last set from modeline ~ - cindent ~ - Last set from /usr/local/share/vim/vim60/ftplugin/c.vim ~ +< shiftwidth=4 ~ + Last set from modeline line 1 ~ + cindent ~ + Last set from /usr/local/share/vim/vim60/ftplugin/c.vim line 30 ~ This is only done when specific option values are requested, not for ":verbose set all" or ":verbose set" without an argument. When the option was set by hand there is no "Last set" message. @@ -132,7 +132,7 @@ autocommand, the script in which it was defined is reported. Note that an option may also have been set as a side effect of setting 'compatible'. A few special texts: - Last set from modeline ~ + Last set from modeline line 1 ~ Option was set in a |modeline|. Last set from --cmd argument ~ Option was set with command line argument |--cmd| or +. @@ -2022,8 +2022,8 @@ A jump table for the options with a short description can be found at |Q_op|. displayed. E.g., when moving vertically it may change column. -'conceallevel' 'cole' *'conceallevel'* *'cole'* - number (default 0) + *'conceallevel'* *'cole'* +'conceallevel' 'cole' number (default 0) local to window {not in Vi} {not available when compiled without the |+conceal| @@ -2657,6 +2657,15 @@ A jump table for the options with a short description can be found at |Q_op|. When omitted a context of six lines is used. See |fold-diff|. + iblank Ignore changes where lines are all blank. Adds + the "-B" flag to the "diff" command if + 'diffexpr' is empty. Check the documentation + of the "diff" command for what this does + exactly. + NOTE: the diff windows will get out of sync, + because no differences between blank lines are + taken into account. + icase Ignore changes in case of text. "a" and "A" are considered the same. Adds the "-i" flag to the "diff" command if 'diffexpr' is empty. @@ -2668,6 +2677,18 @@ A jump table for the options with a short description can be found at |Q_op|. exactly. It should ignore adding trailing white space, but not leading white space. + iwhiteall Ignore all white space changes. Adds + the "-w" flag to the "diff" command if + 'diffexpr' is empty. Check the documentation + of the "diff" command for what this does + exactly. + + iwhiteeol Ignore white space changes at end of line. + Adds the "-Z" flag to the "diff" command if + 'diffexpr' is empty. Check the documentation + of the "diff" command for what this does + exactly. + horizontal Start diff mode with horizontal splits (unless explicitly specified otherwise). @@ -4821,7 +4842,7 @@ A jump table for the options with a short description can be found at |Q_op|. Identifiers are used in recognizing environment variables and after a match of the 'define' option. It is also used for "\i" in a |pattern|. See 'isfname' for a description of the format of this - option. + option. For '@' only characters up to 255 are used. Careful: If you change this option, it might break expanding environment variables. E.g., when '/' is included and Vim tries to expand "$HOME/.viminfo". Maybe you should change 'iskeyword' instead. @@ -4835,8 +4856,9 @@ A jump table for the options with a short description can be found at |Q_op|. {not in Vi} Keywords are used in searching and recognizing with many commands: "w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See - 'isfname' for a description of the format of this option. For C - programs you could use "a-z,A-Z,48-57,_,.,-,>". + 'isfname' for a description of the format of this option. For '@' + characters above 255 check the "word" character class. + For C programs you could use "a-z,A-Z,48-57,_,.,-,>". For a help file it is set to all non-blank printable characters except '*', '"' and '|' (so that CTRL-] on a command finds the help for that command). @@ -5585,7 +5607,7 @@ A jump table for the options with a short description can be found at |Q_op|. h all previous modes when editing a help file a all previous modes r for |hit-enter| and |more-prompt| prompt - Normally you would enable the mouse in all four modes with: > + Normally you would enable the mouse in all five modes with: > :set mouse=a < When the mouse is not enabled, the GUI will still use the mouse for modeless selection. This doesn't move the text cursor. @@ -6107,7 +6129,7 @@ A jump table for the options with a short description can be found at |Q_op|. security reasons. *'printencoding'* *'penc'* -'printencoding' 'penc' String (default empty, except for some systems) +'printencoding' 'penc' string (default empty, except for some systems) global {not in Vi} {only available when compiled with the |+printer| @@ -6116,7 +6138,7 @@ A jump table for the options with a short description can be found at |Q_op|. See |penc-option|. *'printexpr'* *'pexpr'* -'printexpr' 'pexpr' String (default: see below) +'printexpr' 'pexpr' string (default: see below) global {not in Vi} {only available when compiled with the |+printer| diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 3ef3be8e68..4e4390957a 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1551,7 +1551,7 @@ The backslashes before the pipe character are required to avoid it to be recognized as a command separator. The backslash before each space is required for the set command. - *cfilter-plugin* + *cfilter-plugin* *Cfilter* *Lfilter* If you have too many matching messages, you can use the cfilter plugin to reduce the number of entries. Load the plugin with: > packadd cfilter diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt index c4007db936..a1e1feb69d 100644 --- a/runtime/doc/recover.txt +++ b/runtime/doc/recover.txt @@ -28,6 +28,9 @@ You can see the name of the current swap file being used with the command: :sw[apname] *:sw* *:swapname* +Or you can use the |swapname()| function, which also allows for seeing the +swap file name of other buffers. + The name of the swap file is normally the same as the file you are editing, with the extension ".swp". - On Unix, a '.' is prepended to swap file names in the same directory as the diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index c4b38a32d8..8538d0c2f2 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -467,8 +467,8 @@ flag when defining the function, it is not relevant when executing it. > :set cpo-=C < *line-continuation-comment* -To add a comment in between the lines start with '\" '. Notice the space -after the double quote. Example: > +To add a comment in between the lines start with '"\ '. Notice the space +after the backslash. Example: > let array = [ "\ first entry comment \ 'first', diff --git a/runtime/doc/tags b/runtime/doc/tags index 91fe7dfeed..a73ebbe732 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -1955,6 +1955,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* : cmdline.txt /*:* : cmdline.txt /*:* : cmdline.txt /*:* +: cmdline.txt /*:* +: cmdline.txt /*:* := various.txt /*:=* :> change.txt /*:>* :? cmdline.txt /*:?* @@ -2899,8 +2901,17 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* :sN windows.txt /*:sN* :sNext windows.txt /*:sNext* :s\= change.txt /*:s\\=* +:s_# change.txt /*:s_#* +:s_I change.txt /*:s_I* :s_c change.txt /*:s_c* +:s_e change.txt /*:s_e* :s_flags change.txt /*:s_flags* +:s_g change.txt /*:s_g* +:s_i change.txt /*:s_i* +:s_l change.txt /*:s_l* +:s_n change.txt /*:s_n* +:s_p change.txt /*:s_p* +:s_r change.txt /*:s_r* :sa windows.txt /*:sa* :sal windows.txt /*:sal* :sall windows.txt /*:sall* @@ -3504,10 +3515,12 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* map.txt /** autocmd.txt /** autocmd.txt /** + cmdline.txt /** cmdline.txt /** cmdline.txt /** intro.txt /** map.txt /** + cmdline.txt /** map.txt /** term.txt /** term.txt /** @@ -3539,6 +3552,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* map.txt /** map.txt /** cmdline.txt /** + cmdline.txt /** cmdline.txt /** intro.txt /** term.txt /** @@ -3742,6 +3756,7 @@ CTRL-\_CTRL-N intro.txt /*CTRL-\\_CTRL-N* CTRL-] tagsrch.txt /*CTRL-]* CTRL-^ editing.txt /*CTRL-^* CTRL-{char} intro.txt /*CTRL-{char}* +Cfilter quickfix.txt /*Cfilter* Channel eval.txt /*Channel* Channels eval.txt /*Channels* Chinese mbyte.txt /*Chinese* @@ -3781,6 +3796,7 @@ DOS-format-write editing.txt /*DOS-format-write* Dictionaries eval.txt /*Dictionaries* Dictionary eval.txt /*Dictionary* Dictionary-function eval.txt /*Dictionary-function* +DiffUpdated autocmd.txt /*DiffUpdated* Digraphs digraph.txt /*Digraphs* DirChanged autocmd.txt /*DirChanged* E motion.txt /*E* @@ -4682,6 +4698,8 @@ E956 pattern.txt /*E956* E957 eval.txt /*E957* E958 eval.txt /*E958* E96 diff.txt /*E96* +E960 options.txt /*E960* +E961 cmdline.txt /*E961* E97 diff.txt /*E97* E98 diff.txt /*E98* E99 diff.txt /*E99* @@ -4756,6 +4774,7 @@ KVim gui_x11.txt /*KVim* Kibaale uganda.txt /*Kibaale* Korean mbyte.txt /*Korean* L motion.txt /*L* +Lfilter quickfix.txt /*Lfilter* Linux-backspace options.txt /*Linux-backspace* List eval.txt /*List* Lists eval.txt /*Lists* @@ -7337,6 +7356,7 @@ lifelines.vim syntax.txt /*lifelines.vim* limits vi_diff.txt /*limits* line() eval.txt /*line()* line-continuation repeat.txt /*line-continuation* +line-continuation-comment repeat.txt /*line-continuation-comment* line2byte() eval.txt /*line2byte()* linefeed intro.txt /*linefeed* linewise motion.txt /*linewise* @@ -8764,6 +8784,7 @@ swapchoice-variable eval.txt /*swapchoice-variable* swapcommand-variable eval.txt /*swapcommand-variable* swapfile-changed version4.txt /*swapfile-changed* swapinfo() eval.txt /*swapinfo()* +swapname() eval.txt /*swapname()* swapname-variable eval.txt /*swapname-variable* sybase ft_sql.txt /*sybase* syn-sync-grouphere syntax.txt /*syn-sync-grouphere* @@ -9177,7 +9198,9 @@ test_null_job() eval.txt /*test_null_job()* test_null_list() eval.txt /*test_null_list()* test_null_partial() eval.txt /*test_null_partial()* test_null_string() eval.txt /*test_null_string()* +test_option_not_set() eval.txt /*test_option_not_set()* test_override() eval.txt /*test_override()* +test_scrollbar() eval.txt /*test_scrollbar()* test_settime() eval.txt /*test_settime()* testing eval.txt /*testing* testing-variable eval.txt /*testing-variable* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 964b154e5f..6a36b13c73 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -38,8 +38,17 @@ browser use: https://github.com/vim/vim/issues/1234 *known-bugs* -------------------- Known bugs and current work ----------------------- -tar plugin: use "file" to check compression type, use bzip2 only when it -recognizes bzip2 or file ends in .bz2 +Test_scrollbars() fails with X11-Athena GUI or X11-Motif GUI +(Dominique, #3451) + +Flashing highlighting with 'rnu' and folding. +(Vitaly Yashin, 2018 Sep 26, #3484) + +Still a cursorline problem. (Justin Keyes, #3488) + +Crash with recursive use of getcmdline() from Timer. save_ccline isn't used +then. Turn it around: When getcmdline() is called it checks if it is a +recursive call, and saves the cmdline then. (#3493) 'incsearch' with :s: (#3321) - :s/foo using CTRL-G moves to another line, should not happen, or use the @@ -50,6 +59,8 @@ recognizes bzip2 or file ends in .bz2 isn't one? Then :%s?foo should take the first match above the cursor line. +Don't set diffexpr when generating _vimrc for MS-Windows. + Prompt buffer: - Add a command line history. - delay next prompt until plugin gives OK? @@ -91,12 +102,8 @@ Terminal emulator window: - When 'encoding' is not utf-8, or the job is using another encoding, setup conversions. -Not possible to have a comment in between line continuation. Use |\": - let array = [ - \ item, - |\" comment - \ item, - \ ] +Key mapping times out when using a timer in Gvim. (Michael Henry, 2018 Sep 9, +#3417) Does not build with MinGW out of the box: - _stat64 is not defined, need to use "struct stat" in vim.h @@ -105,9 +112,6 @@ Does not build with MinGW out of the box: Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May 13, #2910) Can't reproduce? -Patch to add script line number to script ID. (ichizok, Ozaki Kiichi, 2018 Aug -24, #3362) - Errors found with random data: heap-buffer-overflow in alist_add (#2472) @@ -127,12 +131,18 @@ https://lgtm.com/projects/g/vim/vim/alerts/?mode=list Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17) Related to bracketed paste. I cannot reproduce it. +":mksession" cannot handle a very long 'runtimepath'. (Timothy Madden, 21 Sep +2018, #3466) + Patch in pull request #2967: Allow white space in sign text. (Ben Jackson) Test fails in AppVeyor. Job_info() returns command without backslashes. (Daniel Hahler, 2018 Sep 3, #3404) +Patch to simplify nsis installer. (Ken Takata, 2018 Sep 24, was #3479) +Now included in #3501, using MUI2. + Removing flags from 'cpoptions' breaks the Winbar buttons in termdebug. (Dominique Pelle, 2018 Jul 16) @@ -143,6 +153,9 @@ Invalid memory access with old regexp engine. (Dominique Pelle, 2018 Sep 3, #3405) Introduced by 8.0.1517, which was fixing another memory access error. (Sep 8) +Add function to make use of internal diff, working on two lists and returning +unified diff (list of lines). + Memory leak in test_assert: ==19127== by 0x2640D7: alloc (misc2.c:874) ==19127== by 0x2646D6: vim_strsave (misc2.c:1315) @@ -183,29 +196,36 @@ Patch to support ":tag ". (emmrk, 2018 May 7, #2871) Use something like ":tag {kind}/{tagname}". Not ready to include. +Patch to support menus in terminal: ":tlmenu". (Yee Cheng Chin, #3439) + home_replace() uses $HOME instead of "homedir". (Cesar Martins, 2018 Aug 9) +When the status line uses term_gettitle(), it does not get updated when the +terminal title changes. (Josh Triplett, 2018 Sep 9, #3418) +How would we know that the status line needs to be updated? + Adjust windows installer explanation of behavior. (scootergrisen, #3310) Set g:actual_curbuf when evaluating 'statusline', not just with an expression. (Daniel Hahler, 2018 Aug 8, #3299) -Using an external diff is inefficient. Not all systems have a good diff -program available (esp. MS-Windows). Would be nice to have in internal diff -implementation. Can then also use this for displaying changes within a line. -Olaf Dabrunz is working on this. (10 Jan 2016) -9 Instead invoking an external diff program, use builtin code. One can be - found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c - It's complicated and badly documented. -Alternative: use the xdiff library from git. Unfinished Patch from Christian -Brabandt, 2018 Mar 20, #2732) -Note that this is NOT libxdiff. --> avoid writing all the text to a file, use in-memory only --> add option to use external diff above a certain size. --> when making changes, diff only the part of the buffer that changed. +ml_get error. (Dominique Pelle, 2018 Sep 14, #3434) + +Only output t_Cs when t_Ce is also set. do not use Cs and Ce termcap entries. (Daniel Hahler, 2018 Sep 25) +Add t_cS and t_cR for cursor color select and reset. Use Cs and Cr terminfo +values. + +Furthere xdiff changes: +- More options, e.g. different kind of whitespace diff. +- when editing text, update the surrounding diff blocks. +- omit diff.exe from distribution +- Can we make this show differences within a line? +- add option to use external diff above a certain size. Difference between two regexp engines: #3373 +Patch to handle missin glibwinpthread-1.dll. (Ken Takata, 2018 Sep 23, #2827) + Patch to add arguments to argc() and argv(). (Yegappan Lakshmanan, 2016 Jan 24, #832) Also need a way to get the global arg list? Update later on Jan 24 Update Mar 5. Update Apr 7. Update Jun 5. @@ -215,13 +235,13 @@ includes the first screen line. (2018 Aug 23, #3368) Refactored HTML indent file. (Michael Lee, #1821) -Test for user name completeion ":e ~s" fails because we don't get all -user names. Is there another function to get more? (2018 Sep 3, Stuckrad) - Patch to add getregpoint() and setreg() with an option to set "". (Andy Massimino, 2018 Aug 24, #3370) Better name? +MS-Windows: .lnk file not resolved properly when 'encoding' is set. +(lkintact, 2018 Sep 22, #3473) + Script generated by :mksession does not work well if there are windows with modified buffers change "silent only" into "silent only!" @@ -238,6 +258,8 @@ Compiler warnings (geeknik, 2017 Oct 26): Win32 console: and typed in Insert mode don't result in normal characters. (#3246) +'foldtext' is evaluated too often. (Daniel Hahler, #2773) + Height of quickfix window is not retained with vertical splits. (Lifepillar, 2018 Aug 24, #2998) @@ -253,6 +275,9 @@ is cleared, to avoid going back to the list of errors buffer (would have two windows with it). Can we just remove the jump list entries for the quickfix buffer? +Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6) +Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1. + Make balloon_show() work outside of 'balloonexpr'? Users expect it to work: #2948. (related to #1512?) On Win32 it stops showing, because showState is already ShS_SHOWING. @@ -260,6 +285,12 @@ balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec 20, #2481) Also see #2352, want better control over balloon, perhaps set the position. Should also be possible to add highlighting, like in the status line? +balloonexpr() on MS-Windows GUI doesn't handle accented chars? (nivaemail, +2018 Sep 14) + +Add v:motion_force. (Kana Natsuno, 2008 Dec 6) +Maybe call it v:motiontype. Update in #3490) +Alternaitve: add the force flag to mode(), after "no". Patch to fix that executable() may fail on very long filename in MS-Windows. (Ken Takata, 2016 Feb 1) @@ -281,6 +312,10 @@ Cursor in wrong position when line wraps. (#2540) Patch to parse ":line" in tags file and use it for search. (Daniel Hahler, #2546) Fixes #1057. Missing a test. +Setting 'columns' in a BufEnter autocommand causes a second tab width to +behave strangely, as if there is a gap and a vertical window separator. +(Michael Soyka, 2018 Sep 23, #3477) + Make {skip} argument of searchpair() consistent with other places where we pass an expression to evaluate. Allow passing zero for "never skip". @@ -301,6 +336,11 @@ If 'readonly' is not set but the file appears to be readonly later, try again (wait a little while). CreateFile() returns ERROR_SHARING_VIOLATION (Linwei, 2018 May 5) +Using --remote to open a file in which a # appears does not work on +MS-Windows. Perhaps in \# the \ is seen as a path separator. (Axel Bender, +2017 Feb 9) Can we expand wildcards first and send the path literally to the +receiving Vim? Or make an exception for #, it's not useful remotely. + Should add a test for every command line argument. Check coverage for what is missing: --nofork, -A , -b, -h, etc. @@ -311,6 +351,7 @@ Quickfix window height is not kept with a vertical split. (Lifepillar, 2018 Jun 10, #2998) Improve the installer for MS-Windows. There are a few alternatives: +- mui2 installer improved by Ken Takata (2018 Sep 29) - Add silent install option. (Shane Lee, #751) - Installer from Cream (Steve Hall). - Modern UI 2.0 for the Nsis installer. (Guopeng Wen) @@ -328,10 +369,6 @@ Alternative manpager.vim. (Enno, 2018 Jan 5, #2529) Delete all the speficic stuff for the Borland compiler? (#3374) Patch in #3377 (Thomas Dziedzic) -Does setting 'cursorline' cause syntax highlighting to slow down? Perhaps is -mess up the cache? (Mike Lee Williams, 2018 Jan 27, #2539) -Also: 'foldtext' is evaluated too often. (Daniel Hahler, #2773) - With 'foldmethod' "indent" and appending an empty line, what follows isn't included in the existing fold. Deleting the empty line and undo fixes it. (Oleg Koshovetc, 2018 Jul 15, #3214) @@ -490,6 +527,9 @@ Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313) MS-Windows: buffer completion doesn't work when using backslash (or slash) for a path separator. (xtal8, #2201) +Would be nice for insert mode completion to highlight the text that was added +(and may change when picking another compltion). + Test runtime files. Start with filetype detection: testdir/test_filetype.vim @@ -773,11 +813,6 @@ Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11, #1053) With patch, does it work? -Using --remote to open a file in which a # appears does not work on -MS-Windows. Perhaps in \# the \ is seen as a path separator. (Axel Bender, -2017 Feb 9) Can we expand wildcards first and send the path literally to the -receiving Vim? Or make an exception for #, it's not useful remotely. - ":sbr" docs state it respects 'switchbuf', but "vsplit" does not cause a vertical split. (Haldean Brown, 2017 Mar 1) @@ -1113,9 +1148,6 @@ Patch to avoid redrawing tabline when the popup menu is visible. Patch to add {skip} argument to search(). (Christian Brabandt, 2016 Feb 24) Update 2016 Jun 10, #861 -Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6) -Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1. - Patch to show search statistics. (Christian Brabandt, 2016 Jul 22) When the CursorMovedI event triggers, and CTRL-X was typed, a script cannot @@ -2191,9 +2223,6 @@ that Vim doesn't find the edited file in the buffer list, causing the ATTENTION message? (Tony Mechelynck, 2008 Dec 1) Also: swap files are in ~/tmp/ One has relative file name ".mozilla/...". -Add v:motion_force. (Kana Natsuno, 2008 Dec 6) -Maybe call it v:motiontype. - MS-Windows: editing the first, empty buffer, 'ffs' set to "unix,dos", ":enew" doesn't set 'ff' to "unix". (Ben Fritz, 2008 Dec 5) Reusing the old buffer probably causes this. diff --git a/runtime/indent/prolog.vim b/runtime/indent/prolog.vim index 26a3bc3cd9..ecd0894166 100644 --- a/runtime/indent/prolog.vim +++ b/runtime/indent/prolog.vim @@ -2,6 +2,7 @@ " Maintainer : Gergely Kontra " Revised on : 2002.02.18. 23:34:05 " Language : Prolog +" Last change by: Takuya Fujiwara, 2018 Sep 23 " TODO: " checking with respect to syntax highlighting @@ -37,10 +38,18 @@ function! GetPrologIndent() let ind = indent(pnum) " Previous line was comment -> use previous line's indent if pline =~ '^\s*%' - retu ind + return ind + endif + " Previous line was the start of block comment -> +1 after '/*' comment + if pline =~ '^\s*/\*' + return ind + 1 + endif + " Previous line was the end of block comment -> -1 after '*/' comment + if pline =~ '^\s*\*/' + return ind - 1 endif " Check for clause head on previous line - if pline =~ ':-\s*\(%.*\)\?$' + if pline =~ '\%(:-\|-->\)\s*\(%.*\)\?$' let ind = ind + shiftwidth() " Check for end of clause on previous line elseif pline =~ '\.\s*\(%.*\)\?$' diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index 1143ca7dd7..95d3455dde 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: Bram Moolenaar -" Last Change: 2017 Apr 30 +" Last Change: 2018 Sep 21 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -220,7 +220,7 @@ if exists("c_comment_strings") syn match cCommentSkip contained "^\s*\*\($\|\s\+\)" syn region cCommentString contained start=+L\=\\\@ " Previous Maintainer: Nima Talebi -" Current Maintainer: Hong Xu +" Current Maintainer: Hong Xu " Homepage: http://www.vim.org/scripts/script.php?script_id=3747 -" https://bitbucket.org/xuhdev/syntax-dosini.vim -" Last Change: 2011 Nov 8 +" Repository: https://github.com/xuhdev/syntax-dosini.vim +" Last Change: 2018 Sep 11 " quit when a syntax file was already loaded @@ -17,10 +17,11 @@ endif " shut case off syn case ignore -syn match dosiniNumber "\<\d\+\>" -syn match dosiniNumber "\<\d*\.\d\+\>" -syn match dosiniNumber "\<\d\+e[+-]\=\d\+\>" -syn match dosiniLabel "^.\{-}=" +syn match dosiniLabel "^.\{-}\ze\s*=" nextgroup=dosiniNumber,dosiniValue +syn match dosiniValue "=\zs.*" +syn match dosiniNumber "=\zs\s*\d\+\s*$" +syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$" +syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$" syn region dosiniHeader start="^\s*\[" end="\]" syn match dosiniComment "^[#;].*$" @@ -31,6 +32,7 @@ hi def link dosiniNumber Number hi def link dosiniHeader Special hi def link dosiniComment Comment hi def link dosiniLabel Type +hi def link dosiniValue String let b:current_syntax = "dosini" diff --git a/src/beval.c b/src/beval.c index 74750a27d0..3025b2cc97 100644 --- a/src/beval.c +++ b/src/beval.c @@ -125,8 +125,7 @@ get_beval_info( *textp = lbuf; *colp = col; #ifdef FEAT_VARTABS - if (beval->vts) - vim_free(beval->vts); + vim_free(beval->vts); beval->vts = tabstop_copy(wp->w_buffer->b_p_vts_array); #endif beval->ts = wp->w_buffer->b_p_ts; diff --git a/src/evalfunc.c b/src/evalfunc.c index 5b3eb51623..b29a9afaf1 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -3588,7 +3588,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED) if (!dangerous) ++ex_normal_busy; - exec_normal(TRUE, TRUE); + exec_normal(TRUE, FALSE, TRUE); if (!dangerous) --ex_normal_busy; @@ -13264,6 +13264,10 @@ f_test_scrollbar(typval_T *argvars, typval_T *rettv UNUSED) return; } gui_drag_scrollbar(sb, value, dragging); +# ifndef USE_ON_FLY_SCROLL + // need to loop through normal_cmd() to handle the scroll events + exec_normal(FALSE, TRUE, FALSE); +# endif } #endif diff --git a/src/ex_docmd.c b/src/ex_docmd.c index ab893ddcda..401dbeb07a 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -10497,21 +10497,24 @@ exec_normal_cmd(char_u *cmd, int remap, int silent) { /* Stuff the argument into the typeahead buffer. */ ins_typebuf(cmd, remap, 0, TRUE, silent); - exec_normal(FALSE, FALSE); + exec_normal(FALSE, FALSE, FALSE); } /* * Execute normal_cmd() until there is no typeahead left. + * When "use_vpeekc" is TRUE use vpeekc() to check for available chars. */ void -exec_normal(int was_typed, int may_use_terminal_loop UNUSED) +exec_normal(int was_typed, int use_vpeekc, int may_use_terminal_loop UNUSED) { oparg_T oa; clear_oparg(&oa); finish_op = FALSE; - while ((!stuff_empty() || ((was_typed || !typebuf_typed()) - && typebuf.tb_len > 0)) && !got_int) + while ((!stuff_empty() + || ((was_typed || !typebuf_typed()) && typebuf.tb_len > 0) + || (use_vpeekc && vpeekc() != NUL)) + && !got_int) { update_topline_cursor(); #ifdef FEAT_TERMINAL diff --git a/src/move.c b/src/move.c index fc0f914eb0..ccbd7a023c 100644 --- a/src/move.c +++ b/src/move.c @@ -120,12 +120,10 @@ comp_botline(win_T *wp) } #ifdef FEAT_SYN_HL -static linenr_T last_cursorline = 0; - void reset_cursorline(void) { - last_cursorline = 0; + curwin->w_last_cursorline = 0; } #endif @@ -153,18 +151,18 @@ redraw_for_cursorline(win_T *wp) #ifdef FEAT_SYN_HL if (wp->w_p_cul) { - if (wp->w_redr_type <= VALID && last_cursorline != 0) + if (wp->w_redr_type <= VALID && wp->w_last_cursorline != 0) { - // "last_cursorline" may be set for another window, worst case - // we redraw too much. This is optimized for moving the cursor - // around in the same window. - redrawWinline(wp, last_cursorline, FALSE); + // "w_last_cursorline" may be outdated, worst case we redraw + // too much. This is optimized for moving the cursor around in + // the current window. + redrawWinline(wp, wp->w_last_cursorline, FALSE); redrawWinline(wp, wp->w_cursor.lnum, FALSE); redraw_win_later(wp, VALID); } else redraw_win_later(wp, SOME_VALID); - last_cursorline = wp->w_cursor.lnum; + wp->w_last_cursorline = wp->w_cursor.lnum; } #endif } diff --git a/src/option.c b/src/option.c index 0eb5687eb4..39687e0052 100644 --- a/src/option.c +++ b/src/option.c @@ -1807,12 +1807,12 @@ static struct vimoption options[] = {"langmap", "lmap", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_SECURE, #ifdef FEAT_LANGMAP (char_u *)&p_langmap, PV_NONE, - {(char_u *)"", /* unmatched } */ + {(char_u *)"", (char_u *)0L} #else (char_u *)NULL, PV_NONE, - {(char_u *)NULL, + {(char_u *)NULL, (char_u *)0L} #endif - (char_u *)0L} SCTX_INIT}, + SCTX_INIT}, {"langmenu", "lm", P_STRING|P_VI_DEF|P_NFNAME, #if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG) (char_u *)&p_lm, PV_NONE, @@ -5898,20 +5898,32 @@ check_string_option(char_u **pp) } /* - * Mark a terminal option as allocated, found by a pointer into term_strings[]. + * Return the option index found by a pointer into term_strings[]. + * Return -1 if not found. */ - void -set_term_option_alloced(char_u **p) + int +get_term_opt_idx(char_u **p) { - int opt_idx; + int opt_idx; for (opt_idx = 1; options[opt_idx].fullname != NULL; opt_idx++) if (options[opt_idx].var == (char_u *)p) - { - options[opt_idx].flags |= P_ALLOCED; - return; - } - return; /* cannot happen: didn't find it! */ + return opt_idx; + return -1; // cannot happen: didn't find it! +} + +/* + * Mark a terminal option as allocated, found by a pointer into term_strings[]. + * Return the option index or -1 if not found. + */ + int +set_term_option_alloced(char_u **p) +{ + int opt_idx = get_term_opt_idx(p); + + if (opt_idx >= 0) + options[opt_idx].flags |= P_ALLOCED; + return opt_idx; } #if defined(FEAT_EVAL) || defined(PROTO) @@ -8360,6 +8372,32 @@ set_option_sctx_idx(int opt_idx, int opt_flags, sctx_T script_ctx) curwin->w_p_script_ctx[indir & PV_MASK] = new_script_ctx; } } + +/* + * Set the script_ctx for a termcap option. + * "name" must be the two character code, e.g. "RV". + * When "name" is NULL use "opt_idx". + */ + void +set_term_option_sctx_idx(char *name, int opt_idx) +{ + char_u buf[5]; + int idx; + + if (name == NULL) + idx = opt_idx; + else + { + buf[0] = 't'; + buf[1] = '_'; + buf[2] = name[0]; + buf[3] = name[1]; + buf[4] = 0; + idx = findoption(buf); + } + if (idx >= 0) + set_option_sctx_idx(idx, OPT_GLOBAL, current_sctx); +} #endif /* @@ -10655,7 +10693,7 @@ free_termoptions(void) { struct vimoption *p; - for (p = &options[0]; p->fullname != NULL; p++) + for (p = options; p->fullname != NULL; p++) if (istermoption(p)) { if (p->flags & P_ALLOCED) @@ -10665,6 +10703,10 @@ free_termoptions(void) *(char_u **)(p->var) = empty_option; p->def_val[VI_DEFAULT] = empty_option; p->flags &= ~(P_ALLOCED|P_DEF_ALLOCED); +#ifdef FEAT_EVAL + // remember where the option was cleared + set_option_sctx_idx((int)(p - options), OPT_GLOBAL, current_sctx); +#endif } clear_termcodes(); } diff --git a/src/os_win32.c b/src/os_win32.c index 43b811b13d..a53b7b6270 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -847,7 +847,6 @@ static const struct int chAlt; } VirtKeyMap[] = { - /* Key ANSI alone shift ctrl alt */ { VK_ESCAPE,FALSE, ESC, ESC, ESC, ESC, }, @@ -861,50 +860,49 @@ static const struct { VK_F8, TRUE, 'B', '[', 'e', 'o', }, { VK_F9, TRUE, 'C', '\\', 'f', 'p', }, { VK_F10, TRUE, 'D', ']', 'g', 'q', }, - { VK_F11, TRUE, '\205', '\207', '\211', '\213', }, - { VK_F12, TRUE, '\206', '\210', '\212', '\214', }, + { VK_F11, TRUE, 0x85, 0x87, 0x89, 0x8B, }, + { VK_F12, TRUE, 0x86, 0x88, 0x8a, 0x8c, }, - { VK_HOME, TRUE, 'G', '\302', 'w', '\303', }, - { VK_UP, TRUE, 'H', '\304', '\305', '\306', }, - { VK_PRIOR, TRUE, 'I', '\307', '\204', '\310', }, /*PgUp*/ - { VK_LEFT, TRUE, 'K', '\311', 's', '\312', }, - { VK_RIGHT, TRUE, 'M', '\313', 't', '\314', }, - { VK_END, TRUE, 'O', '\315', 'u', '\316', }, - { VK_DOWN, TRUE, 'P', '\317', '\320', '\321', }, - { VK_NEXT, TRUE, 'Q', '\322', 'v', '\323', }, /*PgDn*/ - { VK_INSERT,TRUE, 'R', '\324', '\325', '\326', }, - { VK_DELETE,TRUE, 'S', '\327', '\330', '\331', }, + { VK_HOME, TRUE, 'G', 0xc2, 'w', 0xc3, }, + { VK_UP, TRUE, 'H', 0xc4, 0xc5, 0xc6, }, + { VK_PRIOR, TRUE, 'I', 0xc7, 0x84, 0xc8, }, /*PgUp*/ + { VK_LEFT, TRUE, 'K', 0xc9, 's', 0xca, }, + { VK_RIGHT, TRUE, 'M', 0xcb, 't', 0xcc, }, + { VK_END, TRUE, 'O', 0xcd, 'u', 0xce, }, + { VK_DOWN, TRUE, 'P', 0xcf, 0xd0, 0xd1, }, + { VK_NEXT, TRUE, 'Q', 0xd2, 'v', 0xd3, }, /*PgDn*/ + { VK_INSERT,TRUE, 'R', 0xd4, 0xd5, 0xd6, }, + { VK_DELETE,TRUE, 'S', 0xd7, 0xd8, 0xd9, }, { VK_SNAPSHOT,TRUE, 0, 0, 0, 'r', }, /*PrtScrn*/ #if 0 /* Most people don't have F13-F20, but what the hell... */ - { VK_F13, TRUE, '\332', '\333', '\334', '\335', }, - { VK_F14, TRUE, '\336', '\337', '\340', '\341', }, - { VK_F15, TRUE, '\342', '\343', '\344', '\345', }, - { VK_F16, TRUE, '\346', '\347', '\350', '\351', }, - { VK_F17, TRUE, '\352', '\353', '\354', '\355', }, - { VK_F18, TRUE, '\356', '\357', '\360', '\361', }, - { VK_F19, TRUE, '\362', '\363', '\364', '\365', }, - { VK_F20, TRUE, '\366', '\367', '\370', '\371', }, + { VK_F13, TRUE, 0xda, 0xdb, 0xdc, 0xdd, }, + { VK_F14, TRUE, 0xde, 0xdf, 0xe0, 0xe1, }, + { VK_F15, TRUE, 0xe2, 0xe3, 0xe4, 0xe5, }, + { VK_F16, TRUE, 0xe6, 0xe7, 0xe8, 0xe9, }, + { VK_F17, TRUE, 0xea, 0xeb, 0xec, 0xed, }, + { VK_F18, TRUE, 0xee, 0xef, 0xf0, 0xf1, }, + { VK_F19, TRUE, 0xf2, 0xf3, 0xf4, 0xf5, }, + { VK_F20, TRUE, 0xf6, 0xf7, 0xf8, 0xf9, }, #endif { VK_ADD, TRUE, 'N', 'N', 'N', 'N', }, /* keyp '+' */ { VK_SUBTRACT, TRUE,'J', 'J', 'J', 'J', }, /* keyp '-' */ /* { VK_DIVIDE, TRUE,'N', 'N', 'N', 'N', }, keyp '/' */ { VK_MULTIPLY, TRUE,'7', '7', '7', '7', }, /* keyp '*' */ - { VK_NUMPAD0,TRUE, '\332', '\333', '\334', '\335', }, - { VK_NUMPAD1,TRUE, '\336', '\337', '\340', '\341', }, - { VK_NUMPAD2,TRUE, '\342', '\343', '\344', '\345', }, - { VK_NUMPAD3,TRUE, '\346', '\347', '\350', '\351', }, - { VK_NUMPAD4,TRUE, '\352', '\353', '\354', '\355', }, - { VK_NUMPAD5,TRUE, '\356', '\357', '\360', '\361', }, - { VK_NUMPAD6,TRUE, '\362', '\363', '\364', '\365', }, - { VK_NUMPAD7,TRUE, '\366', '\367', '\370', '\371', }, - { VK_NUMPAD8,TRUE, '\372', '\373', '\374', '\375', }, + { VK_NUMPAD0,TRUE, 0xda, 0xdb, 0xdc, 0xdd, }, + { VK_NUMPAD1,TRUE, 0xde, 0xdf, 0xe0, 0xe1, }, + { VK_NUMPAD2,TRUE, 0xe2, 0xe3, 0xe4, 0xe5, }, + { VK_NUMPAD3,TRUE, 0xe6, 0xe7, 0xe8, 0xe9, }, + { VK_NUMPAD4,TRUE, 0xea, 0xeb, 0xec, 0xed, }, + { VK_NUMPAD5,TRUE, 0xee, 0xef, 0xf0, 0xf1, }, + { VK_NUMPAD6,TRUE, 0xf2, 0xf3, 0xf4, 0xf5, }, + { VK_NUMPAD7,TRUE, 0xf6, 0xf7, 0xf8, 0xf9, }, + { VK_NUMPAD8,TRUE, 0xfa, 0xfb, 0xfc, 0xfd, }, /* Sorry, out of number space! */ - { VK_NUMPAD9,TRUE, '\376', '\377', '\377', '\367', }, - + { VK_NUMPAD9,TRUE, 0xfe, 0xff, 0xff, 0xf7, }, }; diff --git a/src/proto/ex_docmd.pro b/src/proto/ex_docmd.pro index 8baf953b74..ed42f1cf15 100644 --- a/src/proto/ex_docmd.pro +++ b/src/proto/ex_docmd.pro @@ -59,7 +59,7 @@ int save_current_state(save_state_T *sst); void restore_current_state(save_state_T *sst); void ex_normal(exarg_T *eap); void exec_normal_cmd(char_u *cmd, int remap, int silent); -void exec_normal(int was_typed, int may_use_terminal_loop); +void exec_normal(int was_typed, int use_vpeekc, int may_use_terminal_loop); int find_cmdline_var(char_u *src, int *usedlen); char_u *eval_vars(char_u *src, char_u *srcstart, int *usedlen, linenr_T *lnump, char_u **errormsg, int *escaped); char_u *expand_sfile(char_u *arg); diff --git a/src/proto/option.pro b/src/proto/option.pro index b65cb45bf4..2280365875 100644 --- a/src/proto/option.pro +++ b/src/proto/option.pro @@ -17,11 +17,13 @@ void check_options(void); void check_buf_options(buf_T *buf); void free_string_option(char_u *p); void clear_string_option(char_u **pp); -void set_term_option_alloced(char_u **p); +int get_term_opt_idx(char_u **p); +int set_term_option_alloced(char_u **p); int was_set_insecurely(char_u *opt, int opt_flags); void set_string_option_direct(char_u *name, int opt_idx, char_u *val, int opt_flags, int set_sid); char_u *check_colorcolumn(win_T *wp); char_u *check_stl_option(char_u *s); +void set_term_option_sctx_idx(char *name, int opt_idx); int get_option_value(char_u *name, long *numval, char_u **stringval, int opt_flags); int get_option_value_strict(char_u *name, long *numval, char_u **stringval, int opt_type, void *from); char_u *option_iter_next(void **option, int opt_type); diff --git a/src/screen.c b/src/screen.c index 1a495e62ec..39876ab66c 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2178,9 +2178,15 @@ win_update(win_T *wp) { if (wp->w_p_rnu) { +#ifdef FEAT_FOLDING // 'relativenumber' set: The text doesn't need to be drawn, but // the number column nearly always does. - (void)win_line(wp, lnum, srow, wp->w_height, TRUE, TRUE); + fold_count = foldedCount(wp, lnum, &win_foldinfo); + if (fold_count != 0) + fold_line(wp, fold_count, &win_foldinfo, lnum, row); + else +#endif + (void)win_line(wp, lnum, srow, wp->w_height, TRUE, TRUE); } // This line does not need to be drawn, advance to the next one. @@ -3319,8 +3325,8 @@ win_line( has_spell = TRUE; extra_check = TRUE; - /* Get the start of the next line, so that words that wrap to the next - * line are found too: "etal.". + /* Get the start of the next line, so that words that wrap to the + * next line are found too: "etal.". * Trick: skip a few chars for C/shell/Vim comments */ nextline[SPWORDLEN] = NUL; if (lnum < wp->w_buffer->b_ml.ml_line_count) @@ -3329,8 +3335,8 @@ win_line( spell_cat_line(nextline + SPWORDLEN, line, SPWORDLEN); } - /* When a word wrapped from the previous line the start of the current - * line is valid. */ + /* When a word wrapped from the previous line the start of the + * current line is valid. */ if (lnum == checked_lnum) cur_checked_col = checked_col; checked_lnum = 0; diff --git a/src/structs.h b/src/structs.h index 5f32f73545..2e50cfb377 100644 --- a/src/structs.h +++ b/src/structs.h @@ -2698,6 +2698,10 @@ struct window_S time through cursupdate() to the current virtual column */ +#ifdef FEAT_SYN_HL + linenr_T w_last_cursorline; // where last time 'cursorline' was drawn +#endif + /* * the next seven are used to update the visual part */ diff --git a/src/term.c b/src/term.c index a38e9d4932..df583c4617 100644 --- a/src/term.c +++ b/src/term.c @@ -1477,6 +1477,9 @@ parse_builtin_tcap(char_u *term) if (term_strings[p->bt_entry] == NULL || term_strings[p->bt_entry] == empty_option) { +#ifdef FEAT_EVAL + int opt_idx = -1; +#endif /* 8bit terminal: use CSI instead of [ */ if (term_8bit && term_7to8bit((char_u *)p->bt_string) != 0) { @@ -1492,11 +1495,23 @@ parse_builtin_tcap(char_u *term) STRMOVE(t + 1, t + 2); } term_strings[p->bt_entry] = s; - set_term_option_alloced(&term_strings[p->bt_entry]); +#ifdef FEAT_EVAL + opt_idx = +#endif + set_term_option_alloced( + &term_strings[p->bt_entry]); } } else + { term_strings[p->bt_entry] = (char_u *)p->bt_string; +#ifdef FEAT_EVAL + opt_idx = get_term_opt_idx(&term_strings[p->bt_entry]); +#endif + } +#ifdef FEAT_EVAL + set_term_option_sctx_idx(NULL, opt_idx); +#endif } } else @@ -1622,7 +1637,12 @@ get_term_entries(int *height, int *width) { if (TERM_STR(string_names[i].dest) == NULL || TERM_STR(string_names[i].dest) == empty_option) + { TERM_STR(string_names[i].dest) = TGETSTR(string_names[i].name, &tp); +#ifdef FEAT_EVAL + set_term_option_sctx_idx(string_names[i].name, -1); +#endif + } } /* tgetflag() returns 1 if the flag is present, 0 if not and @@ -1664,7 +1684,12 @@ get_term_entries(int *height, int *width) * Get number of colors (if not done already). */ if (TERM_STR(KS_CCO) == NULL || TERM_STR(KS_CCO) == empty_option) + { set_color_count(tgetnum("Co")); +#ifdef FEAT_EVAL + set_term_option_sctx_idx("Co", -1); +#endif + } # ifndef hpux BC = (char *)TGETSTR("bc", &tp); diff --git a/src/testdir/dumps/Test_diff_with_cursorline_01.dump b/src/testdir/dumps/Test_diff_with_cursorline_01.dump new file mode 100644 index 0000000000..96fa3572f4 --- /dev/null +++ b/src/testdir/dumps/Test_diff_with_cursorline_01.dump @@ -0,0 +1,20 @@ +| +0#0000e05#a8a8a8255@1|b+8#ffffff16#ff404010|e@1| @31||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34 +| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1>f+8#ffffff16#ff404010|o@1| @31 +| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31 +| +0#0000e05#a8a8a8255@1|b+2#0000000#ff404010|a|z| +0&#ffd7ff255@31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|f+2#0000000#ff404010|o@1| +0&#ffd7ff255@31 +| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|a|r| @31 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +|[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1 +| +0&&@74 diff --git a/src/testdir/dumps/Test_diff_with_cursorline_02.dump b/src/testdir/dumps/Test_diff_with_cursorline_02.dump new file mode 100644 index 0000000000..1ba44e6e3b --- /dev/null +++ b/src/testdir/dumps/Test_diff_with_cursorline_02.dump @@ -0,0 +1,20 @@ +| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|e@1| @31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34 +| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31 +| +0#0000e05#a8a8a8255@1|f+8#ffffff16#ff404010|o@1| @31||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1>f+8#ffffff16#ff404010|o@1| @31 +| +0#0000e05#a8a8a8255@1|b+2#0000000#ff404010|a|z| +0&#ffd7ff255@31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|f+2#0000000#ff404010|o@1| +0&#ffd7ff255@31 +| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|a|r| @31 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +|[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|3|,|1| @11|A|l@1| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @5|2|,|1| @11|A|l@1 +| +0&&@74 diff --git a/src/testdir/dumps/Test_diff_with_cursorline_03.dump b/src/testdir/dumps/Test_diff_with_cursorline_03.dump new file mode 100644 index 0000000000..8dbb41481f --- /dev/null +++ b/src/testdir/dumps/Test_diff_with_cursorline_03.dump @@ -0,0 +1,20 @@ +| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|e@1| @31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34 +| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31 +| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31 +| +0#0000e05#a8a8a8255@1|b+10#ffffff16#ff404010|a|z| +8&&@31||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1>f+10#ffffff16#ff404010|o@1| +8&&@31 +| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|a|r| @31 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 +|[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|4|,|1| @11|A|l@1| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @5|3|,|1| @11|A|l@1 +| +0&&@74 diff --git a/src/testdir/dumps/Test_folds_with_rnu_01.dump b/src/testdir/dumps/Test_folds_with_rnu_01.dump new file mode 100644 index 0000000000..15a44d1999 --- /dev/null +++ b/src/testdir/dumps/Test_folds_with_rnu_01.dump @@ -0,0 +1,20 @@ +|++0#0000e05#a8a8a8255| @2|0| >+|-@1| @1|2| |l|i|n|e|s|:| |-@54 +|+| @2|1| |+|-@1| @1|2| |l|i|n|e|s|:| |-@54 +| @1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000000&@56|1|,|1| @10|A|l@1| diff --git a/src/testdir/dumps/Test_folds_with_rnu_02.dump b/src/testdir/dumps/Test_folds_with_rnu_02.dump new file mode 100644 index 0000000000..60d4eb3b37 --- /dev/null +++ b/src/testdir/dumps/Test_folds_with_rnu_02.dump @@ -0,0 +1,20 @@ +|++0#0000e05#a8a8a8255| @2|1| |+|-@1| @1|2| |l|i|n|e|s|:| |-@54 +|+| @2|0| >+|-@1| @1|2| |l|i|n|e|s|:| |-@54 +| @1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @71 +| +0#0000000&@56|3|,|1| @10|A|l@1| diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim index 1deb238735..760440a9b4 100644 --- a/src/testdir/test_diffmode.vim +++ b/src/testdir/test_diffmode.vim @@ -817,3 +817,29 @@ func Test_diff_screen() call delete('Xfile2') endfunc +func Test_diff_with_cursorline() + if !CanRunVimInTerminal() + return + endif + + call writefile([ + \ 'hi CursorLine ctermbg=red ctermfg=white', + \ 'set cursorline', + \ 'call setline(1, ["foo","foo","foo","bar"])', + \ 'vnew', + \ 'call setline(1, ["bee","foo","foo","baz"])', + \ 'windo diffthis', + \ '2wincmd w', + \ ], 'Xtest_diff_cursorline') + let buf = RunVimInTerminal('-S Xtest_diff_cursorline', {}) + + call VerifyScreenDump(buf, 'Test_diff_with_cursorline_01', {}) + call term_sendkeys(buf, "j") + call VerifyScreenDump(buf, 'Test_diff_with_cursorline_02', {}) + call term_sendkeys(buf, "j") + call VerifyScreenDump(buf, 'Test_diff_with_cursorline_03', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('Xtest_diff_cursorline') +endfunc diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim index df4b12c8ce..0384b4fd00 100644 --- a/src/testdir/test_fold.vim +++ b/src/testdir/test_fold.vim @@ -1,6 +1,7 @@ " Test for folding source view_util.vim +source screendump.vim func PrepIndent(arg) return [a:arg] + repeat(["\t".a:arg], 5) @@ -674,3 +675,23 @@ func Test_fold_last_line_with_pagedown() set fdm& enew! endfunc + +func Test_folds_with_rnu() + if !CanRunVimInTerminal() + return + endif + + call writefile([ + \ 'set fdm=marker rnu foldcolumn=2', + \ 'call setline(1, ["{{{1", "nline 1", "{{{1", "line 2"])', + \ ], 'Xtest_folds_with_rnu') + let buf = RunVimInTerminal('-S Xtest_folds_with_rnu', {}) + + call VerifyScreenDump(buf, 'Test_folds_with_rnu_01', {}) + call term_sendkeys(buf, "j") + call VerifyScreenDump(buf, 'Test_folds_with_rnu_02', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('Xtest_folds_with_rnu') +endfunc diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim index f34168228d..d3ac21cd89 100644 --- a/src/testdir/test_options.vim +++ b/src/testdir/test_options.vim @@ -270,6 +270,21 @@ func Test_set_errors() call assert_fails('set t_foo=', 'E846:') endfunc +" Must be executed before other tests that set 'term'. +func Test_000_term_option_verbose() + if has('gui_running') + return + endif + let verb_cm = execute('verbose set t_cm') + call assert_notmatch('Last set from', verb_cm) + + let term_save = &term + set term=ansi + let verb_cm = execute('verbose set t_cm') + call assert_match('Last set from.*test_options.vim', verb_cm) + let &term = term_save +endfunc + func Test_set_ttytype() if !has('gui_running') && has('unix') " Setting 'ttytype' used to cause a double-free when exiting vim and diff --git a/src/tools.bmp b/src/tools.bmp index 9a520cdcee..5b821d7a0c 100644 Binary files a/src/tools.bmp and b/src/tools.bmp differ diff --git a/src/version.c b/src/version.c index 18915ce754..112580c0e9 100644 --- a/src/version.c +++ b/src/version.c @@ -807,6 +807,22 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 451, +/**/ + 450, +/**/ + 449, +/**/ + 448, +/**/ + 447, +/**/ + 446, +/**/ + 445, +/**/ + 444, /**/ 443, /**/