mirror of
https://github.com/wez/wezterm.git
synced 2024-12-25 14:22:37 +03:00
12a6b8df84
DiffState keeps track of a virtual cursor in order to skip emitting cursor location changes when a previous text change has already moved the cursor to the desired position. However, currently the code always advances the cursor by 1 column for each added text change regardless of the width of the text. Fix behavior by advancing the cursor by the width of the text. To avoid having to add a new variable, make 'self.cursor' contain the cursor position for the next cell instead of the current cell. In addition, add a test verifying the behavior. |
||
---|---|---|
.. | ||
line | ||
change.rs | ||
mod.rs |