We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c6648b commit 5fd07acCopy full SHA for 5fd07ac
lib/buffer/buffer.dart
@@ -505,12 +505,9 @@ class Buffer {
505
}
506
507
if (newHeight > oldHeight) {
508
- while (lines.length < newHeight) {
509
- lines.push(_newEmptyLine());
510
- }
511
// Grow larger
512
for (var i = 0; i < newHeight - oldHeight; i++) {
513
- if (_cursorY < oldHeight - 1) {
+ if (newHeight > lines.length) {
514
lines.push(_newEmptyLine());
515
} else {
516
_cursorY++;
@@ -522,7 +519,7 @@ class Buffer {
522
519
if (_cursorY < oldHeight - 1) {
523
520
lines.pop();
524
521
525
- _cursorY++;
+ _cursorY--;
526
527
528
0 commit comments