Skip to content

Commit db6a370

Browse files
authored
Merge pull request ajaxorg#3644 from ajaxorg/fix-wrapped-line-rendering
Fix wrapped line rendering
2 parents a0b9450 + d858d49 commit db6a370

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

lib/ace/autocomplete/popup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var $singleLineEditor = function(el) {
5050
editor.renderer.setShowGutter(false);
5151
editor.renderer.setHighlightGutterLine(false);
5252

53-
editor.$mouseHandler.$focusWaitTimout = 0;
53+
editor.$mouseHandler.$focusTimeout = 0;
5454
editor.$highlightTagPending = true;
5555

5656
return editor;

lib/ace/keyboard/vim.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6037,7 +6037,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
60376037
var name = '';
60386038
if (e.ctrlKey) { name += 'C-'; }
60396039
if (e.altKey) { name += 'A-'; }
6040-
if (e.shiftKey) { name += 'S-'; }
6040+
if ((name || key.length > 1) && e.shiftKey) { name += 'S-'; }
60416041

60426042
name += key;
60436043
if (name.length > 1) { name = '<' + name + '>'; }

lib/ace/layer/text.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ var Text = function(parentEl) {
195195
lineElementsIdx ++;
196196
}
197197

198+
var heightChanged = false;
198199
var row = first;
199200
var foldLine = this.session.getNextFoldLine(row);
200201
var foldStart = foldLine ? foldLine.start.row : Infinity;
@@ -214,10 +215,20 @@ var Text = function(parentEl) {
214215
this.$renderLine(
215216
lineElement, row, row == foldStart ? foldLine : false
216217
);
217-
lineElement.style.height = (config.lineHeight * this.session.getRowLength(row)) + "px";
218+
var height = (config.lineHeight * this.session.getRowLength(row)) + "px";
219+
if (lineElement.style.height != height) {
220+
heightChanged = true;
221+
lineElement.style.height = height;
222+
}
218223
}
219224
row++;
220225
}
226+
if (heightChanged) {
227+
while (lineElementsIdx < this.$lines.cells.length) {
228+
var cell = this.$lines.cells[lineElementsIdx++];
229+
cell.element.style.top = this.$lines.computeLineTop(cell.row, config, this.session) + "px";
230+
}
231+
}
221232
};
222233

223234
this.scrollLines = function(config) {

lib/ace/virtual_renderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ var VirtualRenderer = function(container, theme) {
864864
this.$textLayer.scrollLines(config);
865865

866866
if (this.$showGutter) {
867-
if (changes & this.CHANGE_GUTTER)
867+
if (changes & this.CHANGE_GUTTER || changes & this.CHANGE_LINES)
868868
this.$gutterLayer.update(config);
869869
else
870870
this.$gutterLayer.scrollLines(config);

0 commit comments

Comments
 (0)