amend implementation of 'yw' so that we do not yank newline following last word in line, if we are trying to yank last word
This commit is contained in:
@@ -203,9 +203,13 @@ struct
|
||||
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
||||
|
||||
val high = fMove (buffer, cursorIdx, count)
|
||||
val high = if high = #textLength buffer then high - 1 else high
|
||||
val beforeHigh = high - 1
|
||||
val buffer = LineGap.goToIdx (beforeHigh, buffer)
|
||||
|
||||
val high =
|
||||
if Cursor.isOnNewlineAfterChr (buffer, beforeHigh) then beforeHigh
|
||||
else high
|
||||
|
||||
val buffer = LineGap.goToIdx (high, buffer)
|
||||
val length = high - cursorIdx
|
||||
val str = LineGap.substring (cursorIdx, length, buffer)
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user