<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/insert, branch v0.5.1</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>edit.c: Ensure undo sync when emulating &lt;Esc&gt;x #11706</title>
<updated>2020-01-13T01:09:39+00:00</updated>
<author>
<name>Matthew Malcomson</name>
<email>hardenedapple@gmail.com</email>
</author>
<published>2020-01-13T01:09:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=dfb676fe0d64c708c0c334b09c947db1bae4736d'/>
<id>dfb676fe0d64c708c0c334b09c947db1bae4736d</id>
<content type='text'>
After PR #8226 an unmapped META key in insert mode behaves like
ESC-&lt;key&gt; (:help i_META).

The behaviour does not fully match, since if &lt;Esc&gt;-&lt;key&gt; is pressed
manually then since it were pressed manually `gotchars` would be called
on the second &lt;key&gt; after insert-mode had already been left.

This would mean that `may_sync_undo` (called from `gotchars`) would
call `u_sync(FALSE)` on the second key (since we would be in normal
mode).

This overall means that &lt;Meta-[something]&gt; behaves differently with
respect to undo than &lt;Esc&gt;[something] when the [something] makes a
change.

As an example, under `nvim -u NONE`:
ihello&lt;M-.&gt;u

leaves the buffer empty, while
ihello&lt;Esc&gt;.u

leaves the buffer with one instance of `hello`.

- Fix by calling u_sync() manually in the new clause under
  `normalchar:` in `insert_handle_key`.
- Update test in tui_spec.lua that accidentally relied on the old behaviour.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After PR #8226 an unmapped META key in insert mode behaves like
ESC-&lt;key&gt; (:help i_META).

The behaviour does not fully match, since if &lt;Esc&gt;-&lt;key&gt; is pressed
manually then since it were pressed manually `gotchars` would be called
on the second &lt;key&gt; after insert-mode had already been left.

This would mean that `may_sync_undo` (called from `gotchars`) would
call `u_sync(FALSE)` on the second key (since we would be in normal
mode).

This overall means that &lt;Meta-[something]&gt; behaves differently with
respect to undo than &lt;Esc&gt;[something] when the [something] makes a
change.

As an example, under `nvim -u NONE`:
ihello&lt;M-.&gt;u

leaves the buffer empty, while
ihello&lt;Esc&gt;.u

leaves the buffer with one instance of `hello`.

- Fix by calling u_sync() manually in the new clause under
  `normalchar:` in `insert_handle_key`.
- Update test in tui_spec.lua that accidentally relied on the old behaviour.</pre>
</div>
</content>
</entry>
<entry>
<title>normal: Don't exit CTRL-O mode after processing K_EVENT</title>
<updated>2019-06-04T11:59:43+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2019-06-04T11:12:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=e50aa2a6c65453067ae3554157fdd31ac8af6168'/>
<id>e50aa2a6c65453067ae3554157fdd31ac8af6168</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>insert-mode: interpret unmapped META as ESC</title>
<updated>2018-04-04T01:23:15+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2018-04-03T23:08:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=224ebc0078f29ac3189d7fbd9a59b386ae2ee303'/>
<id>224ebc0078f29ac3189d7fbd9a59b386ae2ee303</id>
<content type='text'>
closes #2454
closes #8213
ref #7972
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes #2454
closes #8213
ref #7972
</pre>
</div>
</content>
</entry>
<entry>
<title>i_CTRL-O: fix :startinsert at end of line (#6963)</title>
<updated>2017-07-08T10:50:58+00:00</updated>
<author>
<name>d10n</name>
<email>david@bitinvert.com</email>
</author>
<published>2017-07-08T10:50:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=69e9cda5ace194a678c125256bc5558bc2bfcfce'/>
<id>69e9cda5ace194a678c125256bc5558bc2bfcfce</id>
<content type='text'>
The gchar_cursor() == NUL check is already done in ins_ctrl_o.
ins_esc changes gchar_cursor() so this if block is probably never
entered.

Issue:

Pressing CTRL-O in insert mode at the end of the line and typing
:startinsert moves the cursor 1 column back, when I expect the cursor
to remain at the end of the line

This is a regression from Vim behavior. Since at least Vim version 7.0,
Vim returns you to insert mode at the end of the line.

091e7d033cbf0f4da068292ce4ac934f1c3dd91e is the first bad neovim commit

Steps to reproduce using `nvim -u NORC`:
`aaaa&lt;C-o&gt;:startinsert&lt;CR&gt;`

Fixes #6962
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The gchar_cursor() == NUL check is already done in ins_ctrl_o.
ins_esc changes gchar_cursor() so this if block is probably never
entered.

Issue:

Pressing CTRL-O in insert mode at the end of the line and typing
:startinsert moves the cursor 1 column back, when I expect the cursor
to remain at the end of the line

This is a regression from Vim behavior. Since at least Vim version 7.0,
Vim returns you to insert mode at the end of the line.

091e7d033cbf0f4da068292ce4ac934f1c3dd91e is the first bad neovim commit

Steps to reproduce using `nvim -u NORC`:
`aaaa&lt;C-o&gt;:startinsert&lt;CR&gt;`

Fixes #6962
</pre>
</div>
</content>
</entry>
<entry>
<title>ops: fix i&lt;c-r&gt; with multi-byte text (#6524)</title>
<updated>2017-04-15T09:19:40+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2017-04-15T09:19:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=12fc1defd6a1b13d1f801173e0b6a1cef28527ae'/>
<id>12fc1defd6a1b13d1f801173e0b6a1cef28527ae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>edit.c: CTRL-SPC: Insert previously-inserted text. #6090</title>
<updated>2017-02-28T00:16:18+00:00</updated>
<author>
<name>Matthew Malcomson</name>
<email>hardenedapple@gmail.com</email>
</author>
<published>2017-02-10T15:58:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=86c2adc07463e37a60801e8fd0572402a5d27262'/>
<id>86c2adc07463e37a60801e8fd0572402a5d27262</id>
<content type='text'>
Default Vim behavior of i_CTRL-&lt;Space&gt; is to insert the last-inserted
text and exit insert mode. :help i_CTRL-@

Before this commit that did not happen because insert_handle_key()
checks for NUL instead of checking for ' ' with a CTRL `mod_mask`.

I'm leaving the check for NUL despite the fact that at the moment that
key is never seen when using the terminal UI (not for C-Space, nor C-@).
This is because I assume it's still allowed for other front-ends to pass
NUL, but at the moment the terminal UI isn't.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Default Vim behavior of i_CTRL-&lt;Space&gt; is to insert the last-inserted
text and exit insert mode. :help i_CTRL-@

Before this commit that did not happen because insert_handle_key()
checks for NUL instead of checking for ' ' with a CTRL `mod_mask`.

I'm leaving the check for NUL despite the fact that at the moment that
key is never seen when using the terminal UI (not for C-Space, nor C-@).
This is because I assume it's still allowed for other front-ends to pass
NUL, but at the moment the terminal UI isn't.
</pre>
</div>
</content>
</entry>
</feed>
