| Commit message (Collapse) | Author | Age |
|
|
|
| |
Using sleep(10) to wait for typeahead to finish is flaky, especially on
macOS, where legacy/global_spec.lua has failed several times.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
N/A patches for version.c:
vim-patch:9.0.0135: comment about tabpage line above the wrong code
Problem: Comment about tabpage line above the wrong code.
Solution: Move the comment. (closes vim/vim#10836)
https://github.com/vim/vim/commit/0b0ccbbfb014e1c9682b86a7a41ff2837b0b8047
|
|
|
|
|
| |
Remove check for MOD_MASK_META as it is for <T- which never appears in TUI.
Make small changes to docs.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
For a local mark without a view, currently trying to restore its view
will put the cursor at topline, which is not the correct behavior.
Initialize `topline_offset` to `MAXLNUM` instead to fix this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
** Refactor
Previously most functions used to "get" a mark returned a position,
changed the line number and sometimes changed even the current buffer.
Now functions return a {x}fmark_T making calling context aware whether
the mark is in another buffer without arcane casting. A new function is
provided for switching to the mark buffer and returning a flag style
Enum to convey what happen in the movement. If the cursor changed, line,
columns, if it changed buffer, etc.
The function to get named mark was split into multiple functions.
- mark_get() -> fmark_T
- mark_get_global() -> xfmark_T
- mark_get_local() -> fmark_T
- mark_get_motion() -> fmark_T
- mark_get_visual() -> fmark_T
Functions that manage the changelist and jumplist were also modified to
return mark types.
- get_jumplist -> fmark_T
- get_changelist -> fmark_T
The refactor is also seen mainly on normal.c, where all the mark
movement has been siphoned through one function nv_gomark, while the
other functions handle getting the mark and setting their movement
flags. To handle whether context marks should be left, etc.
** Mark View
While doing the refactor the concept of a mark view was also
implemented:
The view of a mark currently implemented as the number of lines between
the mark position on creation and the window topline. This allows for
moving not only back to the position of a mark but having the window
look similar to when the mark was defined. This is done by carrying and
extra element in the fmark_T struct, which can be extended later to also
restore horizontal shift.
*** User space features
1. There's a new option, jumpoptions+=view enables the mark view restoring
automatically when using the jumplist, changelist, alternate-file and
mark motions. <C-O> <C-I> g; g, <C-^> '[mark] `[mark]
** Limitations
- The view information is not saved in shada.
- Calls to get_mark should copy the value in the pointer since we are
using pos_to_mark() to wrap and provide a homogeneous interfaces. This
was also a limitation in the previous state of things.
|
| |
|
|
|
|
| |
(#18885)
|
|
|
|
|
|
|
| |
Neovim already removed `evim` (or any similar flags). The 'insertmode'
option is a weird remnant, so get rid of it.
The 'insertmode' option is replaced with a script that closely emulates
the option. This script is documented at :help 'insertmode'
|
|
|
|
|
|
|
|
|
| |
`:tabmove` takes either an argument (`:tabmove -`) or an address (`:-tabmove`).
The code assumed that `:tabmove` is the first command on the cmdline, but that
is not the case when using additional modifiers like `:silent`.
Make the addr parsing more robust by searching the command first, then going
back to check for a potential address `-`.
|
|
|
|
|
|
|
|
|
| |
Problem: Using \{xxx} for encoding a modifier is not nice.
Solution: Use \<*xxx> instead, since it's the same as \<xxx> but producing a
different code.
https://github.com/vim/vim/commit/fccd93f0917234b962ce07d1df3adf9d7105936f
Use this notation in langmap_spec.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This marks the following Vim patches as ported:
vim-patch:8.1.2333: with modifyOtherKeys CTRL-^ doesn't work
Problem: With modifyOtherKeys CTRL-^ doesn't work.
Solution: Handle the exception.
https://github.com/vim/vim/commit/828ffd596394f714270a01a55fc3f949a8bd9b35
vim-patch:8.1.2350: other text for CTRL-V in Insert mode with modifyOtherKeys
Problem: Other text for CTRL-V in Insert mode with modifyOtherKeys.
Solution: Convert the Escape sequence back to key as if modifyOtherKeys is
not set, and use CTRL-SHIFT-V to get the Escape sequence itself.
(closes vim/vim#5254)
https://github.com/vim/vim/commit/fc4ea2a72d36de1196a3ce17352e72f8fe90f4bb
vim-patch:8.2.2084: CTRL-V U doesn't work to enter a Unicode character
Problem: CTRL-V U doesn't work to enter a Unicode character when
modifyOtherKeys is effective. (Ken Takata)
Solution: Add a flag to get_literal() for the shift key. (closes vim/vim#7413)
https://github.com/vim/vim/commit/0684e36a7ee0743f2889698fb8e0e14f7acae423
Omit getcmdkeycmd() change as it depends on Vim patch 8.2.2062, which
may introduce a potential breakage.
|
| |
|
|
|
|
| |
Allows using `undo!` to undo changes and remove them from the undo-tree. Can only be used for moving backwards in the same undo branch.
|
| |
|
| |
|
|
|
|
| |
vim-patch:8.2.4705
|
| |
|
|
|
|
| |
Avoid closing window 999 times.
|
| |
|
|
|
|
|
|
| |
Co-authored-by: Hongyi Lyu <hongyi.lyu95@gmail.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: notomo <notomo.motono@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Put in Visual mode cannot be repeated.
Solution: Use "P" to put without yanking the deleted text into the unnamed
register. (Shougo Matsushita, closes vim/vim#9591)
https://github.com/vim/vim/commit/fb55207ed17918c8a2a6cadf5ad9d5fcf686a7ab
Cherry-pick get_y_previous() and set_y_previous() from patch 8.1.1736.
Nvim has removed y_current, so code related to it is N/A.
|
| |
|
| |
|
| |
|
|
|
|
| |
The first parameter to eq() should be the expected value, and the second
parameter should be the actual value.
|
| |
|
|
|
|
| |
I'm also gonna move some other K_EVENT-related tests to vim_spec.lua
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
feat(eval): add reg_recorded()
This function is used the get the last recorded register.
style(Recording): rename handler to match suggestions
fix(RecordingLeave): send autocommand earlier
This makes the autocommand fire just before setting reg_recorded to
reg_recording, this way we clearly show that we are actually just before
actually quitting the recording mode.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Since 2f06413dfb36 #13042, "ESC+c" sequence is treated as "ESC c"
instead of "M-c" (ALT/META+c) when not mapped, aka "fallthrough"
behavior. But "isolated" (non-ALT/META) mappings to ESC and c were not
resolved. This behavior is especially confusing for the TUI.
Solution:
Resolve isolated ESC, c mappings when there is no M-c mapping.
Change ins_char_typebuf() to escape CSI, K_SPECIAL.
fixes #13086
fixes #15869
|
|
|
|
|
|
|
|
| |
Fix was already applied in 5f144efefa66c9694123b679bab52992279a6015 #15688,
but this commit adds another dimension to the test.
Test correctly fails after reverting 5f144efefa66c9694123b679bab52992279a6015.
ref #15288
|
|
|
|
|
|
|
|
|
|
|
| |
Problem
- `redir_exec` is obsolete, but it keeps getting used in new tests
because people copy existing tests.
- Disadvantages of `redir_exec`:
- Captures extra junk before the actual error/message that we _want_ to test.
- Does not fail on error, unlike e.g. `command()`.
Solution
- Use new functions like `nvim_exec` and `pcall_err`.
|
|
Problem:
Subdirectories like "visual", "insert", "normal" encourage people to
separate *related* tests for no good reason. Typically the _mode_ is
not the relevant topic of a test (and when it is, _then_ create
an appropriate describe() or it()).
Solution:
- Delete the various `test/functional/<mode>/` subdirectories, move
their tests to more meaningful topics.
- Rename `…/normal/` to `…/editor/`.
- Move or merge `…/visual/*` and `…/insert/*` tests into here where
appropriate.
- Rename `…/eval/` to `…/vimscript/`.
- Move `…/viml/*` into here also.
* test(reorg): insert/* => editor/mode_insert_spec.lua
* test(reorg): cmdline/* => editor/mode_cmdline_spec.lua
* test(reorg): eval core tests => eval_spec.lua
|