From b738f6a54eb411dc18aad343dfcbae99dd41fa5e Mon Sep 17 00:00:00 2001 From: mkslanc Date: Mon, 21 Oct 2024 16:23:41 +0400 Subject: [PATCH] imrove test for highlight indent guide --- src/virtual_renderer_test.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/virtual_renderer_test.js b/src/virtual_renderer_test.js index 90ebf40063a..b8b1fda370d 100644 --- a/src/virtual_renderer_test.js +++ b/src/virtual_renderer_test.js @@ -239,7 +239,7 @@ module.exports = { editor._signal("input", {}); assert.equal(editor.renderer.content.textContent, "only visible for empty value"); }, - "test: highlight indent guide": function () { + "test: highlight indent guide": function (done) { editor.session.setValue( "function Test() {\n" + " function Inner() {\n" + " \n" + " \n" + " }\n" + "}"); editor.setOption("highlightIndentGuides", false); @@ -261,6 +261,14 @@ module.exports = { editor.session.selection.$setSelection(1, 15, 1, 15); editor.resize(true); assertIndentGuides( 0); + + editor.session.selection.clearSelection(); + editor.session.selection.$setSelection(4, 5, 4, 5); + + setTimeout(() => { + assertIndentGuides( 2); + done(); + }, 100); }, "test annotation marks": function() { function findPointFillStyle(imageData, x, y) {