Merge pull request #2041 from jpallen:master
Redraw lines and active line highlight when offscreen updates are made
This commit is contained in:
commit
d01cbaf698
2 changed files with 8 additions and 2 deletions
|
|
@ -708,6 +708,7 @@ var Editor = function(renderer, session) {
|
|||
|
||||
// update cursor because tab characters can influence the cursor position
|
||||
this.$cursorChange();
|
||||
this.$updateHighlightActiveLine();
|
||||
};
|
||||
|
||||
this.onTokenizerUpdate = function(e) {
|
||||
|
|
|
|||
|
|
@ -276,8 +276,13 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$changedLines.lastRow = lastRow;
|
||||
}
|
||||
|
||||
if (this.$changedLines.firstRow > this.layerConfig.lastRow ||
|
||||
this.$changedLines.lastRow < this.layerConfig.firstRow)
|
||||
// If the change happened offscreen above us then it's possible
|
||||
// that a new line wrap will affect the position of the lines on our
|
||||
// screen so they need redrawn.
|
||||
if (this.$changedLines.lastRow < this.layerConfig.firstRow)
|
||||
this.$changedLines.lastRow = this.layerConfig.lastRow
|
||||
|
||||
if (this.$changedLines.firstRow > this.layerConfig.lastRow)
|
||||
return;
|
||||
this.$loop.schedule(this.CHANGE_LINES);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue