patch 9.1.0634: Ctrl-P not working by default
Commit:
https://github.com/vim/vim/commit/13032a49b7d2a45e7c774cf23ee8f58f56b03781
Author: Christian Brabandt <[email protected]>
Date: Sun Jul 28 21:16:48 2024 +0200
patch 9.1.0634: Ctrl-P not working by default
Problem: Ctrl-P not working by default
(Jesse Pavel, after v9.1.0598)
Solution: Revert part of v9.1.0598 and set cur_match_pos
correctly according to compl_dir_forward()
fixes: #15370
closes: #15379
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/insexpand.c b/src/insexpand.c
index 00a7b7568..3a168848f 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -4012,11 +4012,8 @@ ins_compl_get_exp(pos_T *ini)
st.ins_buf = curbuf; // In case the buffer was wiped out.
compl_old_match = compl_curr_match; // remember the last current
match
- if (in_fuzzy)
- st.cur_match_pos = (compl_dir_forward())
+ st.cur_match_pos = (compl_dir_forward())
? &st.last_match_pos : &st.first_match_pos;
- else
- st.cur_match_pos = &st.last_match_pos;
// For ^N/^P loop over all the flags/windows/buffers in 'complete'.
for (;;)
diff --git a/src/testdir/test_ins_complete.vim
b/src/testdir/test_ins_complete.vim
index f3f6eac23..cf688ac6a 100644
--- a/src/testdir/test_ins_complete.vim
+++ b/src/testdir/test_ins_complete.vim
@@ -2688,4 +2688,14 @@ func Test_complete_fuzzy_match_tie()
set completeopt&
endfunc
+func Test_complete_backwards_default()
+ new
+ call append(1, ['foobar', 'foobaz'])
+ new
+ call feedkeys("i\<c-p>", 'tx')
+ call assert_equal('foobaz', getline('.'))
+ bw!
+ bw!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab nofoldenable
diff --git a/src/version.c b/src/version.c
index 373cd8cb5..652042295 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 634,
/**/
633,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1sY9as-00HI4r-2Y%40256bit.org.