Files
Thomas Bruyelle e05c42fbf0 fix(text_edit): discarded change from the initial buffer (#1552)
* fix(text_edit): discarded change from the initial buffer

When multiple calls to apply_text_edits, the changes made to the current
buffer are discarded if the following text_edit concerns a file that
is not in the buffer list.

The problem comes from the _switch function, which executes `edit!` when
it detects that the target is not in the buffer list. If a change was
made to the current buffer before that, that change is discarded
(definition of `edit!`).

The fix consists of a different logic: when _switch detects that the
target is not in the buffer list, it calls `badd` prior to switching to
the buffer that has just been added. No more `edit!`, no more discarded
changes.

The added test fails without the patch in the _switch function.

* use better way to have a named buffer
2024-07-19 22:56:11 -07:00
..
2022-04-05 07:39:13 +09:00
2022-08-25 02:02:42 +09:00
2017-07-08 11:49:24 -07:00
2019-12-31 19:25:37 -08:00