aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mark.c
Commit message (Collapse)AuthorAge
* vim-patch:8.2.4719: ">" marker sometimes not displayed in the jumplist (#18056)zeertzjq2022-04-10
| | | | | | | | Problem: ">" marker sometimes not displayed in the jumplist. Solution: If the buffer no longer exists show "-invalid-". (Christian Brabandt, closes vim/vim#10131, closes vim/vim#10100) https://github.com/vim/vim/commit/a0f659c76e22108880f857b8961422afc5ed8f5d Add a modeline to test_jumplist.vim
* fix(coverity): dead code and operands don't affect result #17662dundargoc2022-03-11
| | | | | | | | | | | | | | | | | | | | | * fix(coverity/349942): structurally dead code * fix(coverity/331396): operands don't affect result * fix(coverity/331393): operands don't affect result * fix(coverity/331392): operands don't affect result * fix(coverity/331384): operands don't affect result * fix(coverity/331374): operands don't affect result * fix(coverity/331372): operands don't affect result * fix(coverity/331371): operands don't affect result * fix(coverity/331364): operands don't affect result * fix(coverity/105585): operands don't affect result
* vim-patch:8.2.3532: the previous '' mark is restored after moving the cursor ↵zeertzjq2022-01-31
| | | | (#17246)
* refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | * sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
* vim-patch:8.1.0779: argument for message functions is inconsistentJames McCoy2021-11-01
| | | | | | Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *". https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* Merge pull request #15930 from dundargoc/vim-patch/old-style-c-commentsJan Edmund Lazo2021-10-17
|\ | | | | vim-patch:8.1.2396,8.1.2395,8.1.2394,8.1.2392,8.1.2368,8.1.2388,8.1.2379
| * fixup! vim-patch:8.1.2388: using old C style commentsDundar Göc2021-10-16
| |
| * vim-patch:8.1.2388: using old C style commentsDundar Göc2021-10-06
| | | | | | | | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/4ba37b5833de99db9e9afe8928b31c864182405c
* | 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()
* feat(api): named marks set, get, delete #15346Javier Lopez2021-10-05
| | | | | | | | | | | | | | | | | | | | | | | Adds the following API functions. - nvim_buf_set_mark(buf, name, line, col) * Set marks in a buffer. - nvim_buf_del_mark(buf, name) * Delete a mark that belongs to buffer. - nvim_del_mark(name) * Delete a global mark. - nvim_get_mark(name) * Get a global mark. Tests: - Adds test to all the new api functions, and adds more for the existing nvim_buf_get_mark. * Tests include failure cases. Documentation: - Adds documentation for all the new functions, and improves the existing fucntion docs.
* refactor: format with uncrustify #15741dundargoc2021-09-22
|
* refactor: replace TRUE/FALSE with true/falseDundar Göc2021-07-30
|
* chore: use codespell to spell check #15016dundargoc2021-07-07
|
* vim-patch:8.2.0050: after deleting a file mark it is still in viminfoJan Edmund Lazo2021-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: After deleting a file mark it is still in viminfo. Solution: When a file mark was deleted more recently than the mark in the merged viminfo file was updated, do not store the mark. (Pavol Juhas, closes vim/vim#5401, closes vim/vim#1339) https://github.com/vim/vim/commit/8cd6cd8087ccf08e4303dbf5f732fc4b82b917e1 Neovim's ShaDa is incompatible with Vim's "viminfo" so "viminfo" tests fail. N/A patches for version.c: vim-patch:8.1.1731: command line history not read from viminfo on startup Problem: Command line history not read from viminfo on startup. Solution: Get history length after initializing it. https://github.com/vim/vim/commit/26b654a5df9414e43734eb4c956b67c331d70a50 vim-patch:8.1.1764: ":browse oldfiles" is not tested Problem: ":browse oldfiles" is not tested. Solution: Add a test. https://github.com/vim/vim/commit/5328cb8986d2620f45b41acf28778f8ce2f8cac1 vim-patch:8.1.2111: viminfo file not sufficiently tested Problem: Viminfo file not sufficiently tested. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5009) https://github.com/vim/vim/commit/2a8d3b8997d4fe94bc9c02ae04e873eab2f13b09 vim-patch:8.1.2126: viminfo not sufficiently tested Problem: Viminfo not sufficiently tested. Solution: Add more test cases. Clean up comments. (Yegappan Lakshmanan, closes vim/vim#5032) https://github.com/vim/vim/commit/6bd1d7706766a7899904163e8fd55ea117fb1953
* vim-patch:8.2.0861: cannot easily get all the current marks (#13676)Jan Edmund Lazo2021-01-03
| | | | | | | | | | | Problem: Cannot easily get all the current marks. Solution: Add getmarklist(). (Yegappan Lakshmanan, closes #6032) https://github.com/vim/vim/commit/cfb4b47de08e4437c692d382067dc1692cd83c23 Cherry-pick the column number fix from patch v8.2.0871 because patch v8.2.0871 cannot be fully ported without the method patches. Co-authored-by: Peter Wolf <pwolf2310@gmail.com>
* vim-patch:8.2.1252: ":marks" may show '< and '> mixed upPeter Wolf2020-07-28
| | | | | | Problem: ":marks" may show '< and '> mixed up. Solution: Show the mark position as where '< and '> would jump. https://github.com/vim/vim/commit/54c3fcd852f9d986f81547429e850b3364f058d6
* shed biking: it's always extmarks, never marks extendedBjörn Linse2020-01-20
|
* extmarks/bufhl: reimplement using new marktree data structureBjörn Linse2020-01-16
| | | | | | | | | | | | | | | | | | | | 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
* doc [ci skip]Justin M. Keyes2019-12-31
|
* jumplist: browser-style (or 'tagstack') navigation #11530butwerenotthereyet2019-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Traditionally, when navigating to a specific location from the middle of the jumplist results in shifting the current location to the bottom of the list and adding the new location after it. This behavior is not desireable to all users--see, for example https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior. Here, another jumplist behavior is introduced. When jumpoptions (a new option set added here) includes stack, the jumplist behaves like the tagstack or like history in a web browser. That is, when navigating to a location from the middle of the jumplist 2 first 1 second 0 third <-- current location 1 fourth 2 fifth to a new location the locations after the current location in the jump list are discarded 2 first 1 second 0 third <-- current location The result is that when moving forward from that location, the new location will be appended to the jumplist: 3 first 2 second 1 third 0 new If the new location is the same new == second as some previous (but not immediately prior) entry in the jumplist, 2 first 1 second 0 third <-- current location 1 fourth 2 fifth both occurrences preserved 3 first 2 second 1 third 0 second (new) when moving forward from that location. It would be desireable to go farther and, when the new location is the same as the location that is currently next in the jumplist, new == fourth make the result of navigating to the new location by jumping (e.g. 50gg) be the same as moving forward in the jumplist 2 first 1 second 0 third 1 new <-- current location 2 fifth and simply increment the jumplist index. That change is NOT part of this patch because it would require passing the new cursor location to the function (setpcmark) from all of its callees. That in turn would require those callees to know *before* calling what the new cursor location is, which do they do not currently.
* Merge #11340 'Factor out parse_one_cmd()'Justin M. Keyes2019-11-17
|\ | | | | | | | | This will allow us to reuse the parsing logic elsewhere, namely for 'inccommand' logic, so we don't need to duplicate it for changes such as the repeated colon fix in #11319.
| * vim-patch:8.1.0266: parsing Ex address range is not a separate functionJan Edmund Lazo2019-11-13
| | | | | | | | | | | | Problem: Parsing Ex address range is not a separate function. Solution: Refactor do_one_cmd() to separate address parsing. https://github.com/vim/vim/commit/ee8415bc5998792fab6f4dcf289d027856e05b89
* | nsmarks: initial committimeyyy2019-11-11
|/
* vim-patch:8.1.2058: function for ex command is named inconsistentlyJan Edmund Lazo2019-09-21
| | | | | | Problem: Function for ex command is named inconsistently. Solution: Rename do_marks() to ex_marks(). https://github.com/vim/vim/commit/4bd782339e370bde82c2a8976df9f335cc12eba9
* shada/context: fully remove jumplist duplicates #10898Abdelhakeem Osama2019-09-03
| | | | | | | | | | | | | | | | - Always load files when cleaning up jumplist. - For Shada: avoids writing duplicate entries, which happens when you read from a shada file with duplicate entries (merging the jumplist while writing sometimes produces duplicate entries, bug?) and then write right away (i.e.: without any `:jumps`, `getjumplist()`, or any jump movement, that is: nothing that calls `cleanup_jumplist` with `loadfiles == true`). - For Context: avoids non-idempotent behavior for the same reason (i.e.: first call to `shada_encode_jumps` does not remove duplicate entries). - Do not set pcmark when dumping jumplist for Context. - Retrieving current Context shouldn't add an entry to the jumplist (which will be removed by a subsequent `cleanup_jumplist` anyway, i.e.: tail entry matching current position), just act like `getjumplist` for instance.
* API: ContextJustin M. Keyes2019-07-27
|
* vim-patch:8.1.0833: memory leak when jumps output is filteredJan Edmund Lazo2019-07-15
| | | | | | Problem: Memory leak when jumps output is filtered. Solution: Free the filtered name. (Dominique Pelle, closes vim/vim#3869) https://github.com/vim/vim/commit/d93090f41f70c521cfad5b25efcb0024b9480082
* vim-patch:8.1.1221: filtering does not work when listing marksJan Edmund Lazo2019-07-15
| | | | | | Problem: Filtering does not work when listing marks. Solution: Implement filtering marks. (Marcin Szamotulski, closes vim/vim#3895) https://github.com/vim/vim/commit/ad6dc49a7564a99fca36c1928e3865787d3bd5b2
* vim-patch:8.1.0495: :filter only supports some commandsJan Edmund Lazo2019-07-15
| | | | | | | Problem: :filter only supports some commands. Solution: Add :filter support for more commands. (Marcin Szamotulski, closes vim/vim#2856) https://github.com/vim/vim/commit/f86db78fed78541cefdb706e4779ce5ae9ca7820
* Resolved compile warnings & fixed lot of style related to sign apiAndrej Zieger2019-05-26
|
* vim-patch:8.0.1496: VIM_CLEAR()Justin M. Keyes2019-05-25
| | | | | | | | Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629) vim-patch:8.0.1481
* lintJan Edmund Lazo2019-05-19
|
* vim-patch:8.0.1513: the jumplist is not always properly cleaned upJan Edmund Lazo2019-05-19
| | | | | | Problem: The jumplist is not always properly cleaned up. Solution: Call fname2fnum() before cleanup_jumplist(). (Yegappan Lakshmanan) https://github.com/vim/vim/commit/486797413791f6be12dcec6e5faf4f952e4647ae
* vim-patch:8.0.1498: getjumplist() returns duplicate entriesJan Edmund Lazo2019-05-19
| | | | | | Problem: Getjumplist() returns duplicate entries. (lacygoill) Solution: Call cleanup_jumplist(). (Yegappan Lakshmanan) https://github.com/vim/vim/commit/a7e18d237f817637815f0de44b08df1e0ca0f4f9
* jumplist: avoid extra tail entry #9805Abdelhakeem Osama2019-04-02
| | | fixes #9775
* vim-patch:8.1.0671: cursor in wrong column after auto-format #9729Jan Edmund Lazo2019-03-14
| | | | | Problem: Cursor in the wrong column after auto-formatting. Solution: Check for deleting more spaces than adding. (closes vim/vim#3748) https://github.com/vim/vim/commit/e1e714ef0d1f4bb8b1712795e9106e3b4ff4c7bd
* vim-patch:8.1.0826: too many #ifdefsJan Edmund Lazo2019-03-08
| | | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_VIRTUALEDIT. Adds about 10Kbyte to the code. https://github.com/vim/vim/commit/29ddebef4038d2d2b3bc9d8d3b0109f4046d6fbf
* vim-patch:8.1.0168: output of :marks is too short with multi-byte charsJan Edmund Lazo2018-09-13
| | | | | | | Problem: Output of :marks is too short with multi-byte chars. (Tony Mechelynck) Solution: Get more bytes from the text line. https://github.com/vim/vim/commit/9d5185bf9dfaef59e47c573a60044a21d5e29c0c
* Remove occurences of mb_head_offZviRackover2018-08-15
|
* vim-patch:8.0.1433: illegal memory access after undoJan Edmund Lazo2018-08-09
| | | | | | | Problem: Illegal memory access after undo. (Dominique Pelle) Solution: Avoid the column becomes negative. (Christian Brabandt, closes vim/vim#2533) https://github.com/vim/vim/commit/95dbcbea6d85a5b79d9617ab3863458fdf0217a0
* Remove all occurences of the mb_ptr2char macroZviRackover2018-08-06
| | | | | | | First step towards implemening issue #7401. The same can be done for all deprecated mb_ functions in follow-up patches.
* vim-patch:8.0.0451: some macros are in lower caseJan Edmund Lazo2018-06-12
| | | | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice. https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
* vim-patch:8.0.0466: still macros that should be all-caps (#8510)Jan Edmund Lazo2018-06-10
| | | | | Problem: There are still a few macros that should be all-caps. Solution: Make a few more macros all-caps. https://github.com/vim/vim/commit/8820b48654b62472821d9b155fe03ab7ac13a05c
* vim-patch:8.0.0255: setpos() does not use the buffer argument for all marksJan Edmund Lazo2018-06-06
| | | | | | | | 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 vim/vim#5713) Add more tests. https://github.com/vim/vim/commit/f13e00b2cf381e13fd327b5387a5bd6f004ac2a3
* mark: Make sure that jumplist item will not have zero lnumZyX2017-12-24
| | | | Fixes #7169
* quickfix: fix location list updates.Lech Lorens2017-10-31
| | | | | | Fix quickfix performance optimization which prevented quickfix items from being updated when there were multiple windows with location lists but the buffer with errors only in one of the lists.
* bufhl: fix moveBjörn Linse2017-06-24
|
* *: Add comment to all C filesZyX2017-04-19
|
* *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | Also fixes buffer reusage in setmatches() and complete().