File tree Expand file tree Collapse file tree
tests/RoyalTerminal.IntegrationTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ public void SelectionGesture_PressUsesConfiguredWordBehavior()
161161 }
162162
163163 [ GhosttyNativeFact ]
164- public void SelectionGesture_CustomWordBoundariesAreCopiedByNativeEvent ( )
164+ public void SelectionGesture_CustomWordBoundariesAreCopiedAndCanBeCleared ( )
165165 {
166166 using GhosttyTerminal terminal = new ( 7 , 2 ) ;
167167 using GhosttySelectionGesture gesture = new ( ) ;
@@ -195,6 +195,23 @@ public void SelectionGesture_CustomWordBoundariesAreCopiedByNativeEvent()
195195 trim : false ,
196196 out byte [ ] formatted ) ) ;
197197 Assert . Equal ( "abc" , Encoding . UTF8 . GetString ( formatted ) ) ;
198+
199+ gesture . Reset ( terminal ) ;
200+ press . Clear ( GhosttyVtNative . GhosttySelectionGestureEventOption . WordBoundaryCodepoints ) ;
201+
202+ Assert . True (
203+ gesture . TryApply (
204+ terminal ,
205+ press ,
206+ out GhosttySelectionSnapshot defaultBoundarySelection ) ) ;
207+ Assert . True (
208+ terminal . TryFormatSelection (
209+ GhosttyVtNative . GhosttyFormatterFormat . Plain ,
210+ defaultBoundarySelection ,
211+ unwrap : false ,
212+ trim : false ,
213+ out byte [ ] defaultBoundaryFormatted ) ) ;
214+ Assert . Equal ( "abc.def" , Encoding . UTF8 . GetString ( defaultBoundaryFormatted ) ) ;
198215 }
199216
200217 [ GhosttyNativeFact ]
You can’t perform that action at this time.
0 commit comments