aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/buffer_updates_spec.lua
Commit message (Collapse)AuthorAge
* fix: invoke changed_bytes when rewriting <Tab> char #25125Ilia Choly2023-09-15
| | | | | | | When tabstop and shiftwidth are not equal, tabs are inserted as individual spaces and then rewritten as tab characters in a second pass. That second pass did not call changed_bytes which resulted in events being omitted. Fixes #25092
* fix(spell): splice extmarks on :spellrepall (#23929)zeertzjq2023-06-06
|
* test: don't unnecessarily specify win/buf for `nvim_(get|set)_option_value`Famiu Haque2023-05-22
| | | | `nvim_(get|set)_option_value` pick the current buffer / window by default for buffer-local/window-local (but not global-local) options. So specifying `buf = 0` or `win = 0` in opts is unnecessary for those options. This PR removes those to reduce code clutter.
* refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell2023-05-21
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
* test: replace lfs with luv and vim.fsdundargoc2023-04-04
| | | | | | test: replace lfs with luv luv already pretty much does everything lfs does, so this duplication of dependencies isn't needed.
* fix(diff): trigger on_bytes only once after diffget/diffputJaehwang Jung2023-03-11
| | | | | | | Problem: The fix from b50ee4a8dc4306e4be78ac33fb74b21dc6be5538 may adjust extmark twice, triggering on_bytes callback twice. Solution: Don't let mark_adjust adjust extmark.
* fix(buffer_updates): save and restore current window cursor (#16732)zeertzjq2023-03-09
| | | | | | | | When a buffer update callback is called, textlock is active so buffer text cannot be changed, but cursor can still be moved. This can cause problems when the buffer update is in the middle of an operator, like the one mentioned in #16729. The solution is to save cursor position and restore it afterwards, like how cursor is saved and restored when evaluating an <expr> mapping.
* docs: fix typos (#20394)dundargoc2022-09-30
| | | | | Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: smjonas <jonas.strittmatter@gmx.de> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix!: make :undo! notify buffer update callbacks (#20344)zeertzjq2022-09-26
| | | | | | | | | When :undo! was introduced to Nvim the implementation of 'inccommand' preview callback hasn't been fully decided yet, so not notifying buffer update callbacks made sense for 'inccommand' preview callback in case it needs to undo the changes itself. Now it turns out that the undo-and-forget is done automatically for 'inccommand', so it doesn't make sense for :undo! to avoid notifying buffer update callbacks anymore.
* Merge pull request #18931 from zeertzjq/regexp-num-escapedzeertzjq2022-06-13
|\ | | | | fix(substitute): subtract number of backslashes later
| * fix(substitute): subtract number of backslashes laterzeertzjq2022-06-12
| |
* | fix(buffer): disable buffer-updates before removing from window #18933zeertzjq2022-06-12
|/ | | | | | | | There can be other places that access window buffer info (e.g. `tabpagebuflist()`), so checking `w_closing` in `win_findbuf()` doesn't solve the crash in all cases, and may also cause Nvim's behavior to diverge from Vim. Fix #14998
* fix(extmarks): splice extmarks on accepting spellTony Chen2022-04-02
|
* fix(buffer_updates): handle :sort of already sorted bufferBjörn Linse2021-10-08
|
* fix(buffer_updates): cleanup test behaviorBjörn Linse2021-10-07
|
* fix(buffer_updates): make `lockmarks` not affect extmarks and buffer ↵Anton Adamansky2021-10-07
| | | | | | updates. fixes #12861 Now mark_adjust() will trigger appropriate buf_updates_send_splice() called by extmark_adjust()
* fix(buffer_updates): handle :delete of the very last line in bufferBjörn Linse2021-10-07
|
* fix(extmarks): splice extmarks on nv_Undo #15920Tony Chen2021-10-06
|
* fix(bufupdates): send correct updates for visual pasteThomas Vigouroux2021-08-25
| | | | | | One step further towards stable tree-sitter. Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
* Manually zero out deleted_bytes2 when substituting and joining lineschentau2021-06-29
|
* add tests in buffer_updatesjbyuki2021-06-09
|
* fix(bufupdate): send events when inserting with virtualeditThomas Vigouroux2021-05-18
| | | | | Problem first raised https://github.com/nvim-treesitter/nvim-treesitter/issues/1304
* make get_region_bytecount end-exclusivechentau2021-05-09
|
* refactor nvim_buf_set_lines to use extmark_splicechentau2021-05-09
|
* splice extmarks on every line for block visual pastechentau2021-05-06
|
* Merge pull request #14385 from chentau/extmark_deleteBjörn Linse2021-04-17
|\ | | | | Extmarks: remove `curbuf->deleted_bytes2` from `op_delete`
| * extmarks: remove curbuf->deleted_bytes2 from op_deletechentau2021-04-16
| |
* | flush curbuf->deleted_bytes2 after calling do_movechentau2021-04-14
|/
* Merge pull request #14318 from chentau/extmark_luadoBjörn Linse2021-04-13
|\ | | | | extmark: splice extmarks on :luado
| * extmark: splice extmarks on :luadochentau2021-04-12
| |
* | Merge pull request #14317 from chentau/extmark_subBjörn Linse2021-04-10
|\ \ | | | | | | extmark: correct extmark_splice call with substitute and inccommand when replacing with escaped backslashes
| * | extmark: correct extmark_splice call with inccommandchentau2021-04-09
| |/
* / extmark: fixes for noexpandtab and retabchentau2021-04-02
|/
* Merge pull request #14191 from chentau/extmark_blockpasteBjörn Linse2021-03-24
|\ | | | | Extmarks: send correct buffer events on blockwise paste for nonuniform lines
| * Extmarks: correct buffer events on blockwise pastechentau2021-03-23
| |
* | Correctly splice extmarks on tab with noexpandtab setchentau2021-03-22
|/
* Merge pull request #13973 from chentau/on_bytes_undofileBjörn Linse2021-03-03
|\ | | | | | | | | New versions of neovim will not read undofiles written by nvim before this merge (there will be an error message about incopmatible version). Nvim 0.4 (or an master up to bda12927be84f0e0e05e885f9acb40a7ac2c5524 ) can be used to recover older undofiles, so if you worried about unsaved changes lurking around in undofiles it would make sense to keep such version around somewhere to recover them. This is a necessary change to keep tree-sitter and plugins dependent on byte-level buffer change events fully working with undo states from a undofile. If there is a clear demand we might implement reading of the old format. Such recovered buffers will not be be fully functional with plugins relying on buffer updates or tree-sitter, however.
| * Extmarks: Save extmark undo information to undofile.chentau2021-03-02
| |
* | Merge pull request #13692 from mjlbach/fix_cursor_respect_current_lineBjörn Linse2021-02-16
|\ \ | |/ |/| fix_cursor: do not change line number when edit will not impact cursor row
| * tests: add test for cursor postion when deleting buffer linesMichael Lingelbach2021-01-31
| |
* | buffer_updates: autoload episode III: revenge of the treesBjörn Linse2021-02-14
| |
* | buffer updates: add on_reload callback and handle it in treesitter parserBjörn Linse2021-02-10
| |
* | fix(buf_updates): send updates when putting past last lineThomas Vigouroux2021-02-08
| | | | | | | | Fixes #13710
* | tests: clean up lua/buffer_updates_spec.luaBjörn Linse2021-02-04
| |
* | inccommand: preserve extmarks when undoing preview substitutionBjörn Linse2021-02-04
|/
* api: set_text: fix some byte count issuesBjörn Linse2021-01-01
| | | | | | add byte count tests update documentation
* feat(buffer_updates): allow ignoring when previewingThomas Vigouroux2020-12-15
| | | | | Also adds a test that we actually subscribe to buffer events when in CMDPREVIEW.
* api: multiple decoration providers at onceBjörn Linse2020-10-10
|
* Fix byte updates for blockwise paste at buffer endKillTheMule2020-09-30
|
* bytetrack: add blockwise paste testThomas Vigouroux2020-09-30
|