mirror of
https://github.com/atom/atom.git
synced 2026-02-04 19:54:59 -05:00
Allow the screen row count of N-screen:1-buffer mappings to be updated
This commit is contained in:
@@ -21,7 +21,13 @@ class RowMap
|
||||
|
||||
mapBufferRowRange: (startBufferRow, endBufferRow, screenRows) ->
|
||||
{ mapping, index, bufferRow } = @traverseToBufferRow(startBufferRow)
|
||||
throw new Error("Invalid mapping insertion") if mapping and mapping.bufferRows != mapping.screenRows
|
||||
|
||||
if mapping and mapping.bufferRows != mapping.screenRows
|
||||
if bufferRow == startBufferRow and bufferRow + mapping.bufferRows == endBufferRow
|
||||
mapping.screenRows = screenRows
|
||||
return
|
||||
else
|
||||
throw new Error("Invalid mapping insertion")
|
||||
|
||||
padBefore = startBufferRow - bufferRow
|
||||
padAfter = (bufferRow + mapping?.bufferRows) - endBufferRow
|
||||
|
||||
Reference in New Issue
Block a user