<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/insert/insert_spec.lua, branch 20220114-mix</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>test: reorg #15698</title>
<updated>2021-09-17T16:16:40+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2021-09-17T16:16:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=d8de4eb685e35646c7d541e9a75bdc296127b7e2'/>
<id>d8de4eb685e35646c7d541e9a75bdc296127b7e2</id>
<content type='text'>
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/&lt;mode&gt;/` 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/* =&gt; editor/mode_insert_spec.lua
* test(reorg): cmdline/* =&gt; editor/mode_cmdline_spec.lua
* test(reorg): eval core tests =&gt; eval_spec.lua</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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/&lt;mode&gt;/` 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/* =&gt; editor/mode_insert_spec.lua
* test(reorg): cmdline/* =&gt; editor/mode_cmdline_spec.lua
* test(reorg): eval core tests =&gt; eval_spec.lua</pre>
</div>
</content>
</entry>
<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>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>
</feed>
