Commit Graph

626 Commits

Author SHA1 Message Date
hrsh7th
e61f7c5acc Fix #513 2021-11-13 18:27:58 +09:00
hrsh7th
b3ee713d9b Fix cmdline confirmation bug 2021-11-10 14:12:28 +09:00
hrsh7th
6071062289 Fix #504 2021-11-10 04:28:32 +09:00
Dmytro Meleshko
faaf1c9629 Handle block visual/select modes, refactor mode handling (#498) 2021-11-09 19:41:16 +09:00
hrsh7th
ca63868549 Remove unused methods 2021-11-09 17:11:27 +09:00
hrsh7th
a62375e4cf Improve regex handling 2021-11-09 17:07:13 +09:00
hrsh7th
c7a1b9f7c0 Handle InsertEnter and CmdlineEnter seperately 2021-11-09 15:31:56 +09:00
hrsh7th
97e4229be6 Remove triggering insert enter event 2021-11-09 15:20:05 +09:00
hrsh7th
823c73c16d Improve avoiding InsertEnter's invalid mode detection 2021-11-09 15:01:44 +09:00
hrsh7th
3968bea5e2 Fixes the bug that the cmp.close does not close the menu when using native_menu. 2021-11-09 14:11:51 +09:00
hrsh7th
a0053885ba Use key sequence to avoid the invalid mode detection 2021-11-09 14:05:13 +09:00
hrsh7th
453a62f882 Add textwidth tests 2021-11-08 22:23:53 +09:00
hrsh7th
2fca457453 Re-fix autoindent with tests 2021-11-08 22:16:58 +09:00
hrsh7th
313773584d Fix #494 2021-11-08 21:55:06 +09:00
hrsh7th
ac7c5fc00e Fix #473 2021-11-08 21:24:10 +09:00
hrsh7th
f831dbc107 strict mapping handling 2021-11-08 20:38:08 +09:00
hrsh7th
1628c934d1 Fix tests 2021-11-08 15:47:35 +09:00
hrsh7th
ec788bebd0 Fix #480 2021-11-08 15:05:37 +09:00
hrsh7th
1a79d7e549 Fix #481 2021-11-08 14:59:20 +09:00
Ben Smith
40f667997a Add linebreak option to cmp documentation window (#486) 2021-11-08 13:52:02 +09:00
hrsh7th
1774ff0f84 Fix cmdline confirmation 2021-11-05 22:44:43 +09:00
hrsh7th
d0231d06de Improve async.step 2021-11-05 21:32:30 +09:00
hrsh7th
d9e4ac5997 Save undopoint 2021-11-05 21:31:34 +09:00
hrsh7th
e1f880b7e0 Use apply_text_edits to avoid making the unexpected indentation by '<CR>' 2021-11-05 21:29:34 +09:00
Javier Lopez
9734453d77 fix(ghost_text): generate it using chars instead of bytes (#471)
Previously if the completion entry text had a multibyte character the
ghostly text renderd improperly, for example:

The cursor position is "|"

1. In this case the ghost text was spliting a multibyte character.

entry: comunicación
prev:  comunicacio|<b3>n
now:   comunicacio|n

2. In this case the multibyte character was before meking the index
   wrong, therefore presenting an extra character of the entry as ghost text.

entry: árbol
prev:  arbol|l
now:   arbol|

With this changes the calculation for the bytes to show is done based on
characters avoiding both of the issues above.
2021-11-05 11:49:42 +09:00
Martijn Hoogendoorn
bf31b71f03 Escape <Bar> when setting indentkeys (#474)
In `keymap.autoindent`, `!^F` is added to `indentkeys`, then `<C-f>` is
fed.  In the end `indentkeys` is reset to its original value.

We need to escape any `|` in `indentkeys` when setting the option
because otherwise they are seen as the command separator.
2021-11-05 11:47:06 +09:00
hrsh7th
01fcf869bb Fix expansion bug 2021-11-04 20:49:28 +09:00
hrsh7th
8c08bdf7a4 Allow the callback invoking multiple times if it's the recent one 2021-11-04 18:34:28 +09:00
hrsh7th
68a37a669b Support session 2021-11-04 02:53:05 +09:00
hrsh7th
a881adb1d7 Fix native menu bug 2021-11-04 02:45:23 +09:00
hrsh7th
dc6b458fd2 tmp fix for serveral bugs 2021-11-04 02:31:42 +09:00
hrsh7th
2a58b8f926 Fix #421 2021-11-03 03:16:45 +09:00
hrsh7th
c67ed9d8bc Fix #463 2021-11-03 02:29:06 +09:00
hrsh7th
b4622ed7d2 Fix 2021-11-02 15:46:01 +09:00
hrsh7th
7bc2738e14 Support isIncomplete only response 2021-11-02 15:21:19 +09:00
hrsh7th
0e1ae900a5 Fix #449 2021-11-02 12:13:18 +09:00
hrsh7th
b4e761e307 Fix #456 2021-11-02 12:09:42 +09:00
hrsh7th
017d3abc57 Organize keymap implementation (#454)
* Organize keymap implementation

* Pass tests

* Improve

* Restore tests
2021-11-02 11:59:26 +09:00
hrsh7th
1c33887afb Fix keymap bug 2021-11-02 02:06:34 +09:00
hrsh7th
b7f79a19c6 Fix #443 2021-11-02 01:52:51 +09:00
hrsh7th
674d2b1389 Rewrite keymap.lua (#452)
* Move feedkeys related codes to `cmp.utils.feedkeys`

* Improve mapping handling

* Fix test

* fmt
2021-11-01 22:15:28 +09:00
hrsh7th
e8cb695b0b Fix #436 2021-11-01 14:00:59 +09:00
Dmytro Meleshko
baa39271b2 Fix native menu not respecting cmp.PreselectMode.None sometimes (#447) 2021-11-01 12:55:59 +09:00
Charly Delay
b10bb327f3 misc.merge: ensure that misc.none is never returned (#441)
Before this change:

1. `misc.merge({a = misc.none}, {a = nil})` returned `{a = misc.none}`
2. `misc.merge({a = nil}, {a = misc.none})` returned `{a = misc.none}`

(1) can cause error if a non-existing mapping is set to `config.disable`
(which is an alias for `misc.none`).

(2) does not cause any issue to date, but is inconsistent with the
expected behavior of `misc.merge(…)`.

After this change:

1. `misc.merge({a = misc.none}, {a = nil})` returns `{a = nil}`
2. `misc.merge({a = nil}, {a = misc.none})` returns `{a = nil}`

Fixes #440.
2021-10-30 19:05:20 +09:00
anstadnik
ab7f368547 Add mappings for visual mode (#438) 2021-10-30 13:55:26 +09:00
hrsh7th
669803b9ff Normalize mapping key before use
May be fixes #431
2021-10-29 22:44:41 +09:00
hrsh7th
3945dc5d00 Add basic recently_used comparator 2021-10-29 18:46:51 +09:00
hrsh7th
a6412e590c Fix #423 2021-10-29 13:50:00 +09:00
hrsh7th
732f67dead Fix #427 2021-10-29 13:09:41 +09:00
hrsh7th
6696c6a088 Fix #423 2021-10-28 20:08:08 +09:00