Skip to content

Commit 50aba20

Browse files
committed
Add a test for resizing editors shrinking correctly
Issue codemirror#3362
1 parent 31d89d6 commit 50aba20

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/scroll_test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,14 @@
102102
cm.replaceSelection("\n");
103103
is(cm.cursorCoords(null, "window").bottom < displayBottom(cm, false));
104104
}, {lineWrapping: true});
105+
106+
testCM("height_auto_with_gutter_expect_no_scroll_after_line_delete", function(cm) {
107+
cm.setSize(null, "auto");
108+
cm.setValue("x\n");
109+
cm.execCommand("goDocEnd");
110+
cm.execCommand("delCharBefore");
111+
eq(cm.getScrollInfo().top, 0);
112+
cm.scrollTo(null, 10);
113+
is(cm.getScrollInfo().top < 5);
114+
}, {lineNumbers: true});
105115
})();

0 commit comments

Comments
 (0)