add ability to switch to case-sensitive-search-mode using '?' command from normal mode
This commit is contained in:
@@ -5,9 +5,9 @@ struct
|
|||||||
open AppType
|
open AppType
|
||||||
open InputMsg
|
open InputMsg
|
||||||
|
|
||||||
fun switchToNormalSearchMode (app: app_type) =
|
fun switchToNormalSearchMode (app: app_type, caseSensitive) =
|
||||||
NormalSearchFinish.onSearchChanged
|
NormalSearchFinish.onSearchChanged
|
||||||
(app, "", PersistentVector.empty, 0, 0, false, #buffer app)
|
(app, "", PersistentVector.empty, 0, 0, caseSensitive, #buffer app)
|
||||||
|
|
||||||
fun getNumLength (pos, str) =
|
fun getNumLength (pos, str) =
|
||||||
if pos = String.size str then
|
if pos = String.size str then
|
||||||
@@ -196,7 +196,8 @@ struct
|
|||||||
| #"%" => NormalMove.moveToMatchingPair app
|
| #"%" => NormalMove.moveToMatchingPair app
|
||||||
| #"x" => NormalDelete.removeChr (app, count, time)
|
| #"x" => NormalDelete.removeChr (app, count, time)
|
||||||
| #"J" => NormalDelete.removeLineBreaks (app, count, time)
|
| #"J" => NormalDelete.removeLineBreaks (app, count, time)
|
||||||
| #"/" => switchToNormalSearchMode app
|
| #"/" => switchToNormalSearchMode (app, false)
|
||||||
|
| #"?" => switchToNormalSearchMode (app, true)
|
||||||
| #">" => indnetLine (app, count, time)
|
| #">" => indnetLine (app, count, time)
|
||||||
| #"<" => dedentLine (app, count, time)
|
| #"<" => dedentLine (app, count, time)
|
||||||
(* multi-char commands which can be appended *)
|
(* multi-char commands which can be appended *)
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ struct
|
|||||||
val fPosX = Real32.fromInt startX
|
val fPosX = Real32.fromInt startX
|
||||||
val fPosY = Real32.fromInt startY
|
val fPosY = Real32.fromInt startY
|
||||||
|
|
||||||
val slash = CozetteAscii.make
|
val searchSymbol = CozetteAscii.make
|
||||||
( #"/"
|
( if caseSensitive then #"?" else #"/"
|
||||||
, fPosX
|
, fPosX
|
||||||
, fPosY
|
, fPosY
|
||||||
, z
|
, z
|
||||||
@@ -102,20 +102,6 @@ struct
|
|||||||
val xpos = Int.min (endX, xpos)
|
val xpos = Int.min (endX, xpos)
|
||||||
val x = Real32.fromInt xpos
|
val x = Real32.fromInt xpos
|
||||||
in
|
in
|
||||||
if caseSensitive then
|
|
||||||
CozetteAscii.make
|
|
||||||
( #"?"
|
|
||||||
, x
|
|
||||||
, fPosY
|
|
||||||
, 0.01
|
|
||||||
, TC.scale
|
|
||||||
, floatWindowWidth
|
|
||||||
, floatWindowWidth
|
|
||||||
, r
|
|
||||||
, g
|
|
||||||
, b
|
|
||||||
)
|
|
||||||
else
|
|
||||||
PipeCursor.lerp
|
PipeCursor.lerp
|
||||||
( x
|
( x
|
||||||
, fPosY
|
, fPosY
|
||||||
@@ -137,7 +123,7 @@ struct
|
|||||||
, posX
|
, posX
|
||||||
, startY
|
, startY
|
||||||
, endX
|
, endX
|
||||||
, [cursor, slash]
|
, [cursor, searchSymbol]
|
||||||
, floatWindowWidth
|
, floatWindowWidth
|
||||||
, floatWindowHeight
|
, floatWindowHeight
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user