Switch from POSIX's write() to fwrite(stdout,...) and disable buffering
since vim buffers output explicitly and flushes when needed, like when a
key is typed.
Problem : Command `s/\n//` is being translated into a call to do_join
with a count of 1. But do_join asserts its precondition count
>= 2, which is causing the program to abort.
Note : This in fact revealed bigger problems: generated join command
line count, as well as reported substitutions/lines were
wrong in several cases, since patch 7.4.232.
See:
[patch] http://markmail.org/message/vo7ruair5raccawp
[issue] https://code.google.com/p/vim/issues/detail?id=287
Solution : - Don't generate join command for single-line-range case.
- Make generated join command include:
* lines in range + 1, when range doesn't end at last line.
* lines in range, when range ends at last line.
- Make reported substitutions/lines always be
number-of-lines-joined - 1.
vim-patch:7.4.473
Problem: Cursor movement is incorrect when there is a number
column/sign/fold column and 'sbr' is displayed.
Solution: Adjust the column for 'sbr'. (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-473
vim-patch:7.4.425
Problem: When 'showbreak' is used "gj" may move to the wrong
position. (Nazri Ramliy)
Solution: Adjust virtcol when 'showbreak' is set. (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-425
** CID 74786: Resource leak (RESOURCE_LEAK)
/src/nvim/eval.c: 10614 in f_jobsend()
/src/nvim/eval.c: 10616 in f_jobsend()
save_tv_as_string() should return NULL and input_len <= 0 for an empty
string or error. Callers should check that input != NULL instead of
input_len > 0 and assert(input == NULL) when the length must be checked.
Also:
- Remove NO_CONSOLE_INPUT/NO_CONSULE preprocessor conditionals
- Remove ctrl_c_interrupts variable, check for mapped_ctrl_c directly in
process_interrupts()
- Move ui_inchar profiling to input_poll which is where Nvim blocks for input.
* References to old repository found through grepping
* Replace references from github.com/joyent/libuv to github.com/libuv/libuv
* Fix previous commit by not including whitespace changes
For issue #1560.
- By default vim_feedkeys escaped all input for CSI/K_SPECIAL bytes
before using it. However since vim_replace_termcodes() also escapes
the input string chaining these functions together escapes input twice
- vim_feedkeys() now takes a third Boolean argument to enable/disable
escaping
- Breaks API compatibility
While we're at, using the slightly more portable `command -v` technique
to detect the executable. Also, there's no need to use `io.popen()` if
we aren't going to record the path. Instead, let's use the simpler
`os.execute()` to detect the presence of xclip.