Björn Linse
ca1a00edd6
extmarks/bufhl: reimplement using new marktree data structure
...
Add new "splice" interface for tracking buffer changes at the byte
level. This will later be reused for byte-resolution buffer updates.
(Implementation has been started, but using undocumented "_on_bytes"
option now as interface hasn't been finalized).
Use this interface to improve many edge cases of extmark adjustment.
Changed tests indicate previously incorrect behavior. Adding tests for
more edge cases will be follow-up work (overlaps on_bytes tests)
Don't consider creation/deletion of marks an undoable event by itself.
This behavior was never documented, and imposes complexity for little gain.
Add nvim__buf_add_decoration temporary API for direct access to the new
implementation. This should be refactored into a proper API for
decorations, probably involving a huge dict.
fixes #11598
2020-01-16 12:36:10 +01:00
Husain Alshehhi
dec165b268
PVS/V618: fix emsgf format specifier #11643
2020-01-01 05:59:37 -08:00
Björn Linse
ebdf90e7d7
extmark: don't crash in RO buffer.
2019-11-16 11:58:32 +01:00
Björn Linse
6222cca36a
undo: delete undo_off global without effect
2019-11-16 11:03:43 +01:00
Björn Linse
18a8b702c0
extmark: review changes
2019-11-11 20:18:15 +01:00
timeyyy
a9065a5051
nsmarks: initial commit
2019-11-11 19:43:15 +01:00
Jan Edmund Lazo
6508215b5c
Remove excess <stdint.h>
2019-09-11 22:27:45 -04:00
Justin M. Keyes
83c5701fe6
vim-patch:8.1.1498: ":write" increments b:changedtick even though nothing changed
...
Problem: ":write" increments b:changedtick even though nothing changed.
(Daniel Hahler)
Solution: Only increment b:changedtick if the modified flag is reset.
c024b46678
2019-09-04 21:21:28 +02:00
Jan Edmund Lazo
7bb029eeef
vim-patch:8.0.0858: check if job terminal is running #10908
...
Problem: Can exit while a terminal is still running a job.
Solution: Consider a buffer with a running job like a changed file.
eb44a68b42
2019-09-01 22:54:49 -07:00
Daniel Hahler
0e3b9ea74d
includes
2019-08-07 14:21:23 +02:00
Jan Edmund Lazo
01e3690ca8
vim-patch:8.1.1049: when user tries to exit with CTRL-C message is confusing
...
Problem: When user tries to exit with CTRL-C message is confusing.
Solution: Only mention ":qa!" when there is a changed buffer. (closes vim/vim#4163 )
a84a3dd663
vim-patch:8.1.1052: test for CTRL-C message sometimes fails
Problem: test for CTRL-C message sometimes fails
Solution: Make sure there are no changed buffers.
553e5a5c56
vim-patch:8.1.1053: warning for missing return statement
Problem: Warning for missing return statement. (Dominique Pelle)
Solution: Add return statement.
d6c3f1fa2b
2019-07-28 22:19:11 -04:00
Justin M. Keyes
2731080212
cleanup: remove mch_fopen in favor of os_fopen
2019-07-25 22:32:23 +02:00
Björn Linse
f5c56f03bb
api: allow nvim_buf_attach from lua using callbacks
2019-06-04 13:45:20 +02:00
Justin M. Keyes
ae846b41df
vim-patch:8.0.1496: VIM_CLEAR()
...
Problem: Clearing a pointer takes two lines.
Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi,
closes #2629 )
vim-patch:8.0.1481
2019-05-25 10:07:05 +02:00
Justin M. Keyes
1de77bbcec
cleanup: remove HAVE_SELINUX #10040
...
We never define HAVE_SELINUX, and no one has asked for it.
So remove the dead code.
2019-05-21 11:15:10 +02:00
Jan Edmund Lazo
0e7048ae05
lint
2019-04-30 05:13:06 -04:00
Justin M. Keyes
a01246c275
lint
2019-04-29 21:37:22 +02:00
Justin M. Keyes
8cf7daaaa8
verb_msg: remove char_u
2019-04-29 21:22:55 +02:00
Jan Edmund Lazo
66d86d8bdb
vim-patch:8.1.1207: some compilers give warning messages
...
Problem: Some compilers give warning messages.
Solution: Initialize variables, change printf() argument. (Christian
Brabandt, closes vim/vim#4305 )
1f3601e92e
2019-04-27 00:00:51 -04:00
Jan Edmund Lazo
6de1ed1ff1
vim-patch:8.0.0776: function prototypes missing without the quickfix feature
...
Problem: Function prototypes missing without the quickfix feature. (Tony
Mechelynck)
Solution: Move non-quickfix functions to buffer.c.
f0a521f4f7
2019-04-14 19:09:19 -04:00
Jan Edmund Lazo
e2f845632d
vim-patch:8.1.0308: a quick undo shows "1 seconds ago"
...
Problem: A quick undo shows "1 seconds ago". (Tony Mechelynck)
Solution: Add singular/plural message.
fd6100b2aa
2019-04-05 22:57:08 -04:00
Jan Edmund Lazo
ca49ae9e36
vim-patch:8.1.0135: undo message delays screen update for CTRL-O u
...
Problem: Undo message delays screen update for CTRL-O u.
Solution: Add smsg_attr_keep(). (closes vim/vim#3125 )
e0429681ae
2019-04-04 19:10:31 -04:00
Justin M. Keyes
512e0caae2
Merge #9036 'func_attr_printf'
2018-10-07 19:36:01 +02:00
ssteinbach
6c496db4b7
undo: Fix infinite loop if undo_read_byte returns EOF #2880
...
Problem: Corrupt(?) persistent undofile leads to an infinite loop.
Solution: Break out of loop if undo_read_byte returns EOF (cf.
u_read_undo() which does this too).
backtrace from lldb (@ a743297be2
):
Process 70700 stopped
* thread 1: tid = 0x147d2d1, 0x00007fff8c8facd7 libsystem_pthread.dylib`__mtx_droplock + 209, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame 0: 0x00007fff8c8facd7 libsystem_pthread.dylib`__mtx_droplock + 209
libsystem_pthread.dylib`__mtx_droplock + 209:
-> 0x7fff8c8facd7: movq %rcx, -0x50(%rbp)
0x7fff8c8facdb: movq %r8, -0x58(%rbp)
0x7fff8c8facdf: movq %rdx, -0x68(%rbp)
0x7fff8c8face3: movq %r14, -0x60(%rbp)
(lldb) bt
* thread 1: tid = 0x147d2d1, 0x00007fff8c8facd7 libsystem_pthread.dylib`__mtx_droplock + 209, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame 0: 0x00007fff8c8facd7 libsystem_pthread.dylib`__mtx_droplock + 209
frame 1: 0x00007fff8c8fab4e libsystem_pthread.dylib`pthread_mutex_unlock + 63
frame 2: 0x00007fff915da2a4 libsystem_c.dylib`getc + 63
frame 3: 0x000000010e6194b9 nvim`undo_read_byte(bi=0x00007fff5181a838) + 25 at undo.c:1553
frame 4: 0x000000010e619685 nvim`unserialize_uhp(bi=0x00007fff5181a838, file_name=0x000000000f2e8060) + 421 at undo.c:840
frame 5: 0x000000010e618abb nvim`u_read_undo(name=0x0000000000000000, hash=0x00007fff5181af80, orig_name=0x000000000f370dd0) + 1579 at undo.c:1363
frame 6: 0x000000010e4a8db9 nvim`readfile(fname=0x000000000f370dd0, sfname=0x000000000f370dd0, from=0, lines_to_skip=0, lines_to_read=2147483647, eap=0x00007fff5181b6a0, flags=1) + 21017 at fileio.c:
1961
frame 7: 0x000000010e3ecc8b nvim`open_buffer(read_stdin=0, eap=0x00007fff5181b6a0, flags=0) + 603 at buffer.c:153
...
closes #2879
closes #2880
2018-09-30 17:54:24 +02:00
MichaHoffmann
8cb04c2230
fixed lint errors
2018-09-24 22:05:01 +02:00
MichaHoffmann
affef0aab8
add func_attr_printf in :
...
log.c
message.c
strings.c
fixed some printf warnings in:
src/nvim/undo.c
src/nvim/eval.c
src/nvim/eval/encode.c
src/nvim/eval/typval.c
src/nvim/ex_getln.c
src/nvim/fileio.c
src/nvim/lua/executor.c
src/nvim/main.c
src/nvim/regexp_nfa.c
src/nvim/shada.c
src/nvim/spellfile.c
src/nvim/tui/terminfo.c
src/nvim/garray.h
2018-09-24 21:28:04 +02:00
Jan Edmund Lazo
58559a2249
vim-patch:8.0.1443: compiler complains about uninitialized variable
...
Problem: Compiler complains about uninitialized variable. (Tony Mechelynck)
Solution: Assign a value to the variable.
059fd01021
2018-09-17 22:40:29 -04:00
Jan Edmund Lazo
ee51061b8c
lint
2018-08-20 23:49:34 -04:00
Jan Edmund Lazo
612f3fd57a
undo: undo_undoes is bool
2018-08-20 23:49:34 -04:00
Jan Edmund Lazo
0ff4854800
undo: did_undo,absolute in u_undo_end() are bool
2018-08-20 23:49:34 -04:00
Jan Edmund Lazo
6f55aa3502
undo: update undo_time() function signature
...
sec,file,absolute (params) are bool.
Fix callers and local variables of undo_time().
2018-08-20 23:49:34 -04:00
Jan Edmund Lazo
19717ca1e8
undo: above,did_undo in undo_time() are bool
2018-08-20 23:49:34 -04:00
Jan Edmund Lazo
66ed6297b0
vim-patch:8.0.1441: using ":undo 0" leaves undo in wrong state
...
Problem: Using ":undo 0" leaves undo in wrong state.
Solution: Instead of searching for state 1 and go above, just use the start.
(Ozaki Kiichi, closes vim/vim#2595 )
ce46d934af
2018-08-20 21:48:08 -04:00
Jan Edmund Lazo
672449e448
memline: copy in ml_replace() is bool
2018-08-07 13:11:51 -04:00
ZyX
eaf2a25f12
*: Replace b_changedtick with new always-inline functions
...
Ref #8474
2018-06-22 00:44:31 +03:00
Jan Edmund Lazo
6e55c5997e
vim-patch:8.0.0636: when reading the undo file fails may use uninitialized data ( #8599 )
...
Problem: When reading the undo file fails may use uninitialized data.
Solution: Always clear the buffer on failure.
56f2db562d
2018-06-20 02:29:51 +02:00
Jan Edmund Lazo
3c7ea8d619
vim-patch:8.0.0451: some macros are in lower case
...
Problem: Some macros are in lower case.
Solution: Make a few more macros upper case. Avoid lower case macros use an
argument twice.
91acfffc1e
2018-06-12 02:00:50 -04:00
Jan Edmund Lazo
bbb88607c9
vim-patch:8.0.0466: still macros that should be all-caps ( #8510 )
...
Problem: There are still a few macros that should be all-caps.
Solution: Make a few more macros all-caps.
8820b48654
2018-06-10 12:24:00 +02:00
Justin M. Keyes
f85cbea725
Merge #7917 'API: buffer updates'
2018-06-08 10:13:04 +02:00
KillTheMule
65e7f6f0b9
Rename some more, fixe borked renaming
2018-05-23 22:07:27 +02:00
KillTheMule
e7451f8a91
Some renamings and doc changes
2018-05-23 22:07:27 +02:00
KillTheMule
2106bada5b
Enable -Wconversion
2018-05-23 22:07:27 +02:00
KillTheMule
6bdcbef2f5
The grand renaming
2018-05-23 22:07:27 +02:00
KillTheMule
37b8e95fd6
Lint
2018-05-23 22:07:27 +02:00
Peter Hodge
edcc73e766
API: Implement buffer updates
...
Originally written by @phodge in
https://github.com/neovim/neovim/pull/5269 .
2018-05-23 22:07:27 +02:00
ZyX
a90672fc3d
undo: Silence PVS/V547: expression may be false on other system
2018-04-22 20:22:46 +03:00
KunMing Xie
8728a5d50b
vim-patch:8.0.0448: some macros are lower case ( #7936 )
...
Problem: Some macros are in lower case, which can be confusing.
Solution: Make a few lower case macros upper case.
b5aedf3e22
ref #6297
2018-01-30 20:29:15 +01:00
ZyX
9ea1752d60
*: Provide list length when allocating lists
2018-01-14 01:33:16 +03:00
Michael Schupikov
d5bce42b52
vim-patch:8.0.0074
...
Problem: Cannot make Vim fail on an internal error.
Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an
internal error without mentioning where.
95f096030e
Signed-off-by: Michael Schupikov <michael@schupikov.de >
2017-12-15 15:50:58 -05:00
KunMing Xie
e13b4a21ca
vim-patch:8.0.0149 ( #7127 )
...
Problem: ":earlier" and ":later" do not work after startup or reading the
undo file.
Solution: Use absolute time stamps instead of relative to the Vim start
time. (Christian Brabandt, Pavel Juhas, closes vim/vim#1300 , closes
vim/vim#1254 )
cbd4de44e8
2017-08-08 03:32:47 +02:00