fix(vim): properly delete last line

This commit is contained in:
Aram Drevekenin 2020-10-14 19:04:26 +02:00
parent cd5ddd1d29
commit dfcd3dda58
7 changed files with 7 additions and 7 deletions

View File

@ -1156,7 +1156,7 @@ impl vte::Perform for TerminalOutput {
let newlines = self.newline_indices.iter().rev();
let mut delete_until = self.characters.len();
for newline_index in newlines {
if newline_index < &self.cursor_position {
if newline_index <= &self.cursor_position {
break;
}
delete_until = *newline_index;

View File

@ -28,5 +28,5 @@ expression: snapshot
21 line38
22 line39
NORMAL testfile.rs unix | utf-8 | rust 40% 17:1
"/tmp/testfile.rs" 42L, 285C
Bye from Mosaic!█

View File

@ -29,4 +29,4 @@ expression: snapshot
21 line38
22 line39
NORMAL testfile.rs unix | utf-8 | rust 40% 17:1
"/tmp/testfile.rs" 42L, 285C

View File

@ -28,5 +28,5 @@ expression: snapshot
2 line28
3 line29
NORMAL testfile.rs unix | utf-8 | rust 61% 26:1
"/tmp/testfile.rs" 42L, 285C
Bye from Mosaic!█

View File

@ -29,4 +29,4 @@ expression: snapshot
2 line28
3 line29
NORMAL testfile.rs unix | utf-8 | rust 61% 26:1
"/tmp/testfile.rs" 42L, 285C

View File

@ -28,5 +28,5 @@ expression: snapshot
2 line26
3 line27
NORMAL testfile.rs unix | utf-8 | rust 57% 24:1
"/tmp/testfile.rs" 42L, 285C
Bye from Mosaic!█

View File

@ -29,4 +29,4 @@ expression: snapshot
2 line26
3 line27
NORMAL testfile.rs unix | utf-8 | rust 57% 24:1
"/tmp/testfile.rs" 42L, 285C