Skip to content

Commit

Permalink
Make refresh always re-estimate line heights when wrapping is on
Browse files Browse the repository at this point in the history
Closes #6228
  • Loading branch information
marijnh committed Apr 17, 2020
1 parent 1c59254 commit e43adbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/edit/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ export default function(CodeMirror) {
clearCaches(this)
scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop)
updateGutterSpace(this.display)
if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)
if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping)
estimateLineHeights(this)
signal(this, "refresh", this)
}),
Expand Down

0 comments on commit e43adbb

Please sign in to comment.