rename 'Cursor.toNextChrNew' function to 'Cursor.toNextChr', and update usages to change the name as well.
This commit is contained in:
@@ -351,7 +351,7 @@ struct
|
|||||||
helpToNextChr (strPos + 1, str, absIdx + 1, stl, ~1, findChr, count)
|
helpToNextChr (strPos + 1, str, absIdx + 1, stl, ~1, findChr, count)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
val toNextChrNew = ToNextChr.foldNext
|
val toNextChr = ToNextChr.foldNext
|
||||||
|
|
||||||
structure ToPrevChr =
|
structure ToPrevChr =
|
||||||
MakeIfCharFolderPrev
|
MakeIfCharFolderPrev
|
||||||
|
|||||||
@@ -149,8 +149,7 @@ struct
|
|||||||
else
|
else
|
||||||
let
|
let
|
||||||
val newCursorIdx =
|
val newCursorIdx =
|
||||||
Cursor.toNextChrNew
|
Cursor.toNextChr (buffer, cursorIdx, {findChr = #"\n", count = 1})
|
||||||
(buffer, cursorIdx, {findChr = #"\n", count = 1})
|
|
||||||
in
|
in
|
||||||
if newCursorIdx >= #textLength buffer - 2 then
|
if newCursorIdx >= #textLength buffer - 2 then
|
||||||
finishAfterDeletingBuffer (app, cursorIdx, buffer, time, [])
|
finishAfterDeletingBuffer (app, cursorIdx, buffer, time, [])
|
||||||
@@ -181,8 +180,7 @@ struct
|
|||||||
let
|
let
|
||||||
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
||||||
val newCursorIdx =
|
val newCursorIdx =
|
||||||
Cursor.toNextChrNew
|
Cursor.toNextChr (buffer, cursorIdx, {findChr = #"\n", count = 1})
|
||||||
(buffer, cursorIdx, {findChr = #"\n", count = 1})
|
|
||||||
val buffer = LineGap.goToIdx (newCursorIdx, buffer)
|
val buffer = LineGap.goToIdx (newCursorIdx, buffer)
|
||||||
in
|
in
|
||||||
if
|
if
|
||||||
@@ -721,7 +719,7 @@ struct
|
|||||||
val {buffer, cursorIdx, ...} = app
|
val {buffer, cursorIdx, ...} = app
|
||||||
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
||||||
val newCursorIdx =
|
val newCursorIdx =
|
||||||
Cursor.toNextChrNew (buffer, cursorIdx, {findChr = chr, count = count})
|
Cursor.toNextChr (buffer, cursorIdx, {findChr = chr, count = count})
|
||||||
in
|
in
|
||||||
if newCursorIdx = ~1 then
|
if newCursorIdx = ~1 then
|
||||||
NormalFinish.clearMode app
|
NormalFinish.clearMode app
|
||||||
@@ -749,7 +747,7 @@ struct
|
|||||||
val {buffer, cursorIdx, ...} = app
|
val {buffer, cursorIdx, ...} = app
|
||||||
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
||||||
val newCursorIdx =
|
val newCursorIdx =
|
||||||
Cursor.toNextChrNew (buffer, cursorIdx, {findChr = chr, count = count})
|
Cursor.toNextChr (buffer, cursorIdx, {findChr = chr, count = count})
|
||||||
in
|
in
|
||||||
if newCursorIdx = ~1 then
|
if newCursorIdx = ~1 then
|
||||||
NormalFinish.clearMode app
|
NormalFinish.clearMode app
|
||||||
@@ -980,7 +978,7 @@ struct
|
|||||||
val start = Int.max (cursorIdx - 1, 0)
|
val start = Int.max (cursorIdx - 1, 0)
|
||||||
val buffer = LineGap.goToIdx (start, buffer)
|
val buffer = LineGap.goToIdx (start, buffer)
|
||||||
|
|
||||||
val high = Cursor.toNextChrNew (buffer, start, {findChr = chr, count = 1})
|
val high = Cursor.toNextChr (buffer, start, {findChr = chr, count = 1})
|
||||||
val buffer = LineGap.goToIdx (high, buffer)
|
val buffer = LineGap.goToIdx (high, buffer)
|
||||||
val origLow = Cursor.matchPair (buffer, high)
|
val origLow = Cursor.matchPair (buffer, high)
|
||||||
in
|
in
|
||||||
@@ -1024,7 +1022,7 @@ struct
|
|||||||
val start = Int.max (cursorIdx - 1, 0)
|
val start = Int.max (cursorIdx - 1, 0)
|
||||||
val buffer = LineGap.goToIdx (start, buffer)
|
val buffer = LineGap.goToIdx (start, buffer)
|
||||||
|
|
||||||
val high = Cursor.toNextChrNew (buffer, start, {findChr = chr, count = 1})
|
val high = Cursor.toNextChr (buffer, start, {findChr = chr, count = 1})
|
||||||
val buffer = LineGap.goToIdx (high, buffer)
|
val buffer = LineGap.goToIdx (high, buffer)
|
||||||
val low = Cursor.matchPair (buffer, high)
|
val low = Cursor.matchPair (buffer, high)
|
||||||
in
|
in
|
||||||
|
|||||||
@@ -522,7 +522,7 @@ struct
|
|||||||
val {cursorIdx, buffer, searchList, bufferModifyTime, ...} = app
|
val {cursorIdx, buffer, searchList, bufferModifyTime, ...} = app
|
||||||
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
||||||
val newCursorIdx =
|
val newCursorIdx =
|
||||||
Cursor.toNextChrNew (buffer, cursorIdx, {findChr = chr, count = count})
|
Cursor.toNextChr (buffer, cursorIdx, {findChr = chr, count = count})
|
||||||
in
|
in
|
||||||
if newCursorIdx = ~1 then
|
if newCursorIdx = ~1 then
|
||||||
NormalFinish.clearMode app
|
NormalFinish.clearMode app
|
||||||
@@ -536,7 +536,7 @@ struct
|
|||||||
val {cursorIdx, buffer, searchList, bufferModifyTime, ...} = app
|
val {cursorIdx, buffer, searchList, bufferModifyTime, ...} = app
|
||||||
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
||||||
val newCursorIdx =
|
val newCursorIdx =
|
||||||
Cursor.toNextChrNew (buffer, cursorIdx, {findChr = chr, count = count})
|
Cursor.toNextChr (buffer, cursorIdx, {findChr = chr, count = count})
|
||||||
in
|
in
|
||||||
if newCursorIdx = ~1 then
|
if newCursorIdx = ~1 then
|
||||||
NormalFinish.clearMode app
|
NormalFinish.clearMode app
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ struct
|
|||||||
val {buffer, cursorIdx, ...} = app
|
val {buffer, cursorIdx, ...} = app
|
||||||
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
val buffer = LineGap.goToIdx (cursorIdx, buffer)
|
||||||
val newCursorIdx =
|
val newCursorIdx =
|
||||||
Cursor.toNextChrNew (buffer, cursorIdx, {findChr = chr, count = count})
|
Cursor.toNextChr (buffer, cursorIdx, {findChr = chr, count = count})
|
||||||
in
|
in
|
||||||
if newCursorIdx = ~1 then
|
if newCursorIdx = ~1 then
|
||||||
NormalFinish.clearMode app
|
NormalFinish.clearMode app
|
||||||
@@ -350,7 +350,7 @@ struct
|
|||||||
val start = Int.max (cursorIdx - 1, 0)
|
val start = Int.max (cursorIdx - 1, 0)
|
||||||
val buffer = LineGap.goToIdx (start, buffer)
|
val buffer = LineGap.goToIdx (start, buffer)
|
||||||
|
|
||||||
val high = Cursor.toNextChrNew (buffer, start, {findChr = chr, count = 1})
|
val high = Cursor.toNextChr (buffer, start, {findChr = chr, count = 1})
|
||||||
val buffer = LineGap.goToIdx (high, buffer)
|
val buffer = LineGap.goToIdx (high, buffer)
|
||||||
val low = Cursor.matchPair (buffer, high) + 1
|
val low = Cursor.matchPair (buffer, high) + 1
|
||||||
in
|
in
|
||||||
@@ -382,7 +382,7 @@ struct
|
|||||||
val start = Int.max (cursorIdx - 1, 0)
|
val start = Int.max (cursorIdx - 1, 0)
|
||||||
val buffer = LineGap.goToIdx (start, buffer)
|
val buffer = LineGap.goToIdx (start, buffer)
|
||||||
|
|
||||||
val high = Cursor.toNextChrNew (buffer, start, {findChr = chr, count = 1})
|
val high = Cursor.toNextChr (buffer, start, {findChr = chr, count = 1})
|
||||||
val buffer = LineGap.goToIdx (high, buffer)
|
val buffer = LineGap.goToIdx (high, buffer)
|
||||||
val low = Cursor.matchPair (buffer, high)
|
val low = Cursor.matchPair (buffer, high)
|
||||||
val high = high + 1
|
val high = high + 1
|
||||||
|
|||||||
Reference in New Issue
Block a user