Bram Moolenaar [Sat, 28 Jan 2017 17:23:54 +0000 (18:23 +0100)]
patch 8.0.0255: setpos() does not use the buffer argument for all marks
Problem: When calling setpos() with a buffer argument it often is ignored.
(Matthew Malcomson)
Solution: Make the buffer argument work for all marks local to a buffer.
(neovim #5713) Add more tests.
Bram Moolenaar [Sat, 28 Jan 2017 17:08:12 +0000 (18:08 +0100)]
patch 8.0.0254: error message of assert functions is sometimes incomplete
Problem: When using an assert function one can either specify a message or
get a message about what failed, not both.
Solution: Concatenate the error with the message.
Bram Moolenaar [Sat, 28 Jan 2017 16:11:14 +0000 (17:11 +0100)]
patch 8.0.0253: error when loading session if winminheight is 2
Problem: When creating a session when winminheight is 2 or larger and
loading that session gives an error.
Solution: Also set winminheight before setting winheight to 1. (Rafael
Bodill, neovim #5717)
Bram Moolenaar [Sat, 28 Jan 2017 15:39:34 +0000 (16:39 +0100)]
patch 8.0.0252: not properly recognizing word characters between 128 and 255
Problem: Characters below 256 that are not one byte are not always
recognized as word characters.
Solution: Make vim_iswordc() and vim_iswordp() work the same way. Add a test
for this. (Ozaki Kiichi)
Bram Moolenaar [Sat, 28 Jan 2017 15:06:38 +0000 (16:06 +0100)]
patch 8.0.0251: not easy to select Python 2 or 3
Problem: It is not so easy to write a script that works with both Python 2
and Python 3, even when the Python code works with both.
Solution: Add 'pyxversion', :pyx, etc. (Marc Weber, Ken Takata)
Bram Moolenaar [Sat, 28 Jan 2017 12:48:10 +0000 (13:48 +0100)]
patch 8.0.0250: virtcol() does not work well for multi-byte characters
Problem: When virtcol() gets a column that is not the first byte of a
multi-byte character the result is unpredictable. (Christian
Ludwig)
Solution: Correct the column to the first byte of a multi-byte character.
Change the utf-8 test to new style.
Bram Moolenaar [Fri, 27 Jan 2017 21:20:13 +0000 (22:20 +0100)]
patch 8.0.0249: CI failure when a submit is close to previous one
Problem: When two submits happen quick after each other, the tests for the
first one may error out.
Solution: Use a git depth of 10 instead of 1. (Christian Brabandt)
Bram Moolenaar [Fri, 27 Jan 2017 20:48:54 +0000 (21:48 +0100)]
patch 8.0.0247: need to type Ctrl-N twice to select a completion
Problem: Under some circumstances, one needs to type Ctrl-N or Ctrl-P twice
to have a menu entry selected. (Lifepillar)
Solution: call ins_compl_free(). (Christian Brabandt, closes #1411)
Bram Moolenaar [Fri, 27 Jan 2017 19:03:18 +0000 (20:03 +0100)]
patch 8.0.0244: making t_BE empty only has an effect before startup
Problem: When the user sets t_BE empty after startup to disable bracketed
paste, this has no direct effect.
Solution: When t_BE is made empty write t_BD. When t_BE is made non-empty
write the new value.
Bram Moolenaar [Thu, 26 Jan 2017 21:51:56 +0000 (22:51 +0100)]
patch 8.0.0243: tolower() does not work if the byte count changes
Problem: When making a character lower case with tolower() changes the byte
cound, it is not made lower case.
Solution: Add strlow_save(). (Dominique Pelle, closes #1406)
Bram Moolenaar [Thu, 26 Jan 2017 21:07:33 +0000 (22:07 +0100)]
patch 8.0.0242: no tests for user command completion
Problem: Completion of user defined functions is not covered by tests.
Solution: Add tests. Also test various errors of user-defined commands.
(Dominique Pelle, closes #1413)
Bram Moolenaar [Thu, 26 Jan 2017 20:36:34 +0000 (21:36 +0100)]
patch 8.0.0241: fallback implementation of mch_memmove is unused
Problem: Vim defines a mch_memmove() function but it doesn't work, thus is
always unused.
Solution: Remove the mch_memmove implementation. (suggested by Dominique
Pelle)
Bram Moolenaar [Thu, 26 Jan 2017 19:11:12 +0000 (20:11 +0100)]
patch 8.0.0239: no CI with an address sanitizer
Problem: The address sanitizer sometimes finds errors, but it needs to be
run manually.
Solution: Add an environment to Travis with clang and the address sanitizer.
(Christian Brabandt) Also include changes only on github.
Bram Moolenaar [Tue, 24 Jan 2017 20:18:19 +0000 (21:18 +0100)]
patch 8.0.0237: when 'wildoptions' is "tagfile" completion may not work
Problem: When setting wildoptions=tagfile the completion context is not set
correctly. (desjardins)
Solution: Check for EXPAND_TAGS_LISTFILES. (Christian Brabandt, closes #1399)
Bram Moolenaar [Tue, 24 Jan 2017 19:47:50 +0000 (20:47 +0100)]
patch 8.0.0236: gcc complains about uninitialized variable
Problem: Gcc complains that a variable may be used uninitialized. Confusion
between variable and label name. (John Marriott)
Solution: Initialize it. Rename end to end_lnum.
Bram Moolenaar [Tue, 24 Jan 2017 18:55:43 +0000 (19:55 +0100)]
patch 8.0.0234: crash when using put in Visual mode
Problem: When several lines are visually selected and one of them is short,
using put may cause a crash. (Axel Bender)
Solution: Check for a short line. (Christian Brabandt)
Bram Moolenaar [Tue, 24 Jan 2017 18:08:15 +0000 (19:08 +0100)]
patch 8.0.0232: paste does not work when 'esckeys' is off
Problem: Pasting in Insert mode does not work when bracketed paste is used
and 'esckeys' is off.
Solution: When 'esckeys' is off disable bracketed paste in Insert mode.
Bram Moolenaar [Tue, 24 Jan 2017 16:50:52 +0000 (17:50 +0100)]
patch 8.0.0230: bracketed paste does not support line breaks
Problem: When using bracketed paste line breaks are not respected.
Solution: Turn CR characters into a line break if the text is being
inserted. (closes #1404)
Bram Moolenaar [Tue, 24 Jan 2017 14:57:55 +0000 (15:57 +0100)]
patch 8.0.0228: pasting in xterm on the command line has PasteStart
Problem: When pasting test in an xterm on the command line it is surrounded
by <PasteStart> and <PasteEnd>. (Johannes Kaltenbach)
Solution: Add missing changes.
Bram Moolenaar [Tue, 24 Jan 2017 14:46:48 +0000 (15:46 +0100)]
patch 8.0.0227: crash with ff=dos when first line in file has no CR
Problem: Crash when 'fileformat' is forced to "dos" and the first line in
the file is empty and does not have a CR character.
Solution: Don't check for CR before the start of the buffer.
Bram Moolenaar [Tue, 24 Jan 2017 12:18:43 +0000 (13:18 +0100)]
patch 8.0.0226: test for patch 8.0.0224 missing CR characters
Problem: The test for patch 8.0.0224 misses the CR characters and passes
even without the fix. (Christian Brabandt)
Solution: Use double quotes and \<CR>.
Bram Moolenaar [Mon, 23 Jan 2017 20:53:53 +0000 (21:53 +0100)]
patch 8.0.0225: put in Visual block mode terminates early
Problem: When a block is visually selected and put is used on the end of
the selection only one line is changed.
Solution: Check for the end properly. (Christian Brabandt, neovim issue
5781)
Bram Moolenaar [Mon, 23 Jan 2017 20:31:09 +0000 (21:31 +0100)]
patch 8.0.0224: change to 'fileformats' from autocmd does not take effect
Problem: When 'fileformats' is changed in a BufReadPre auto command, it
does not take effect in readfile(). (Gary Johnson)
Solution: Check the value of 'fileformats' after executing auto commands.
(Christian Brabandt)
Bram Moolenaar [Mon, 23 Jan 2017 19:47:12 +0000 (20:47 +0100)]
patch 8.0.0223: Coverity warns for an uninitialized variable
Problem: Coverity gets confused by the flags passed to find_tags() and
warnts for an uninitialized variable.
Solution: Disallow using cscope and help tags at the same time.
Bram Moolenaar [Sun, 22 Jan 2017 19:04:51 +0000 (20:04 +0100)]
patch 8.0.0222: blockwise put on multi-byte character misplaced
Problem: When a multi-byte character ends in a zero byte, putting blockwise
text puts it before the character instead of after it.
Solution: Use int instead of char for the character under the cursor.
(Luchr, closes #1403) Add a test.
Bram Moolenaar [Sun, 22 Jan 2017 18:25:33 +0000 (19:25 +0100)]
patch 8.0.0220: completion of highlight names misses a few values
Problem: Completion for :match does not show "none" and other missing
highlight names.
Solution: Skip over cleared entries before checking the index to be at the
end.
Bram Moolenaar [Sun, 22 Jan 2017 17:34:57 +0000 (18:34 +0100)]
patch 8.0.0219: ubsan reports errors for overflow
Problem: Ubsan reports errors for integer overflow.
Solution: Define macros for minimum and maximum values. Select an
expression based on the value. (Mike Williams)
Bram Moolenaar [Sun, 22 Jan 2017 14:05:12 +0000 (15:05 +0100)]
patch 8.0.0212: buffer for key name may be too small
Problem: The buffer used to store a key name theoreticaly could be too
small. (Coverity)
Solution: Count all possible modifier characters. Add a check for the
length just in case.
Bram Moolenaar [Sat, 21 Jan 2017 13:45:09 +0000 (14:45 +0100)]
patch 8.0.0209: cursor binding does not work with :substitute
Problem: When using :substitute with the "c" flag and 'cursorbind' is set
the cursor is not updated in other windows.
Solution: Call do_check_cursorbind(). (Masanori Misono)
Bram Moolenaar [Fri, 20 Jan 2017 20:51:53 +0000 (21:51 +0100)]
patch 8.0.0208: internally used commands end up in history
Problem: Internally used commands for CTRL-Z and mouse click end up in
history. (Matthew Malcomson)
Solution: Use do_cmdline_cmd() instead of stuffing them in the readahead
buffer. (James McCoy, closes #1395)
Bram Moolenaar [Tue, 17 Jan 2017 18:20:15 +0000 (19:20 +0100)]
patch 8.0.0203: order of complication flags is sometimes wrong
Problem: Order of complication flags is sometimes wrong.
Solution: Put interface-specific flags before ALL_CFLAGS. (idea by Yousong
Zhou, closes #1100)
Bram Moolenaar [Tue, 17 Jan 2017 15:56:28 +0000 (16:56 +0100)]
patch 8.0.0199: compiler warnings for libcall
Problem: Warning for an unused parameter when the libcall feature is
disabled. Warning for a function type cast when compiling with
-pedantic.
Solution: Add UNUSED. Use a different type cast. (Damien Molinier)
Bram Moolenaar [Tue, 17 Jan 2017 15:27:10 +0000 (16:27 +0100)]
patch 8.0.0198: some syntax arguments take effect even after "if 0"
Problem: Some syntax arguments take effect even after "if 0". (Taylor
Venable)
Solution: Properly skip the syntax statements. Make "syn case" and "syn
conceal" report the current state. Fix that "syn clear" didn't
reset the conceal flag. Add tests for :syntax skipping properly.
Bram Moolenaar [Mon, 16 Jan 2017 21:37:42 +0000 (22:37 +0100)]
patch 8.0.0196: profile test is slo and does not work on MS-Windows
Problem: The test for :profile is slow and does not work on MS-Windows.
Solution: Use the "-es" argument. (Dominique Pelle) Swap single and double
quotes for system()
Bram Moolenaar [Mon, 16 Jan 2017 19:53:34 +0000 (20:53 +0100)]
patch 8.0.0195: fail to jump to static tag in current file
Problem: Jumping to a tag that is a static item in the current file fails.
(Kazunobu Kuriyama)
Solution: Make sure the first byte of the tag key is not NUL. (Suggested by
James McCoy, closes #1387)
Bram Moolenaar [Sun, 15 Jan 2017 15:59:07 +0000 (16:59 +0100)]
patch 8.0.0191: can't build with Ruby on some systems
Problem: Some systems do not have ruby_sysinit(), causing the build to
fail.
Solution: Clean up how ruby_sysinit() and NtInitialize() are used. (Taro
Muraoka)
Bram Moolenaar [Sun, 15 Jan 2017 15:52:51 +0000 (16:52 +0100)]
patch 8.0.0190: finding duplicate tags uses a slow linear search
Problem: Detecting duplicate tags uses a slow linear search.
Solution: Use a much faster hash table solution. (James McCoy, closes #1046)
But don't add hi_keylen, it makes hash tables 50% bigger.
Bram Moolenaar [Sun, 15 Jan 2017 12:53:49 +0000 (13:53 +0100)]
patch 8.0.0188: redrawing for 'cursorbind' is inefficient
Problem: Using NOT_VALID for redraw_later() to update the cursor
line/column highlighting is not efficient.
Solution: Call validate_cursor() when 'cul' or 'cuc' is set.
Bram Moolenaar [Sat, 14 Jan 2017 18:24:52 +0000 (19:24 +0100)]
patch 8.0.0184: when an error is caught Vim still exits with non-zero result
Problem: When in Ex mode and an error is caught by try-catch, Vim still
exits with a non-zero exit code.
Solution: Don't set ex_exitval when inside a try-catch. (partly by Christian
Brabandt)
Bram Moolenaar [Sat, 14 Jan 2017 14:52:46 +0000 (15:52 +0100)]
patch 8.0.0182: cursor ilne not update when 'cursorbind' is set
Problem: When 'cursorbind' and 'cursorline' are set, but 'cursorcolumn' is
not, then the cursor line highlighting is not updated. (Hirohito
Higashi)
Solution: Call redraw_later() with NOT_VALID.
Bram Moolenaar [Sat, 14 Jan 2017 13:54:33 +0000 (14:54 +0100)]
patch 8.0.0181: with cursorbind set cursor column highlighting is off
Problem: When 'cursorbind' and 'cursorcolumn' are both on, the column
highlignt in non-current windows is wrong.
Solution: Add validate_cursor(). (Masanori Misono, closes #1372)
Bram Moolenaar [Sat, 14 Jan 2017 13:36:08 +0000 (14:36 +0100)]
patch 8.0.0180: error E937 is used twice
Problem: Error E937 is used both for duplicate key in JSON and for trying
to delete a buffer that is in use.
Solution: Rename the JSON error to E938. (Norio Takagi, closes #1376)
Bram Moolenaar [Sat, 14 Jan 2017 13:28:30 +0000 (14:28 +0100)]
patch 8.0.0179: cannot have a local value for 'formatprg'
Problem: 'formatprg' is a global option but the value may depend on the
type of buffer. (Sung Pae)
Solution: Make 'formatprg' global-local. (closes #1380)
Bram Moolenaar [Fri, 13 Jan 2017 21:01:02 +0000 (22:01 +0100)]
patch 8.0.0177: BufEnter autocommand not fired for a directory
Problem: When opening a buffer on a directory and inside a try/catch then
the BufEnter event is not triggered.
Solution: Return NOTDONE from readfile() for a directory and deal with the
three possible return values. (Justin M. Keyes, closes #1375,
closes #1353)
Bram Moolenaar [Thu, 12 Jan 2017 20:44:49 +0000 (21:44 +0100)]
patch 8.0.0175: setting language on MS-Windows does not always work
Problem: Setting language in gvim on MS-Windows does not work when
libintl.dll is dynamically linked with msvcrt.dll.
Solution: Use putenv() from libintl as well. (Ken Takata, closes #1082)
Bram Moolenaar [Thu, 12 Jan 2017 19:28:25 +0000 (20:28 +0100)]
patch 8.0.0174: executing "locale -a" on MS-Windows needlessly
Problem: For completion "locale -a" is executed on MS-Windows, even though
it most likely won't work.
Solution: Skip executing "locale -a" on MS-Windows. (Ken Takata)
Bram Moolenaar [Thu, 12 Jan 2017 19:06:33 +0000 (20:06 +0100)]
patch 8.0.0173: build fails with EBCDIC defined
Problem: When compiling with EBCDIC defined the build fails. (Yaroslav
Kuzmin)
Solution: Move sortFunctions() to the right file. Avoid warning for
redefining __SUSV3.
Bram Moolenaar [Wed, 11 Jan 2017 21:40:19 +0000 (22:40 +0100)]
patch 8.0.0172: command line window does not work
Problem: The command selected in the command line window is not executed.
(Andrey Starodubtsev)
Solution: Save and restore the command line at a lower level. (closes #1370)
Bram Moolenaar [Tue, 10 Jan 2017 15:12:29 +0000 (16:12 +0100)]
patch 8.0.0167: str2nr()/str2float() fail with negative values
Problem: str2nr() and str2float() do not always work with negative values.
Solution: Be more flexible about handling signs. (LemonBoy, closes #1332)
Add more tests.
Bram Moolenaar [Tue, 10 Jan 2017 14:15:37 +0000 (15:15 +0100)]
patch 8.0.0166: JSON with a duplicate key gives an internal error
Problem: JSON with a duplicate key gives an internal error. (Lcd)
Solution: Give a normal error. Avoid an error when parsing JSON from a
remote client fails.