@@ -227,14 +227,24 @@ module View = {
227227
228228 module MouseState = Pointer . MkState ();
229229
230- let deco = (~syntax: CachedSyntax . t , ~z: Zipper . t , ~globals: Globals . t ) => [
230+ let deco =
231+ (
232+ ~expand_selection= false ,
233+ ~syntax: CachedSyntax . t ,
234+ ~globals: Globals . t ,
235+ z: Zipper . t ,
236+ ) => [
231237 CaretDec . view(
232238 ~measured= syntax. measured,
233239 ~font_metrics= globals. font_metrics,
234240 z,
235241 ),
236242 Arms . Indicated . term(~font_metrics= globals. font_metrics, ~syntax, z),
237- Highlight . selection(
243+ (
244+ expand_selection
245+ ? Highlight . selection_expanded(~term_data= syntax. term_data)
246+ : Highlight . selection
247+ )(
238248 ~measured= syntax. measured,
239249 ~shape_map= syntax. shape_map,
240250 ~font_metrics= globals. font_metrics,
@@ -261,6 +271,7 @@ module View = {
261271 ~selected: bool ,
262272 ~overlays: list (Node . t )=[] ,
263273 ~dynamics: Language . Dynamics . Map . t ,
274+ ~expand_selection=?,
264275 model: Model . t ,
265276 ) => {
266277 /* Sync document-level click listener for closing context menu */
@@ -271,9 +282,10 @@ module View = {
271282 let edit_decos =
272283 selected
273284 ? deco(
274- ~z = model . editor . state . zipper ,
285+ ~expand_selection ? ,
275286 ~syntax= model. editor. syntax,
276287 ~globals,
288+ model. editor. state. zipper,
277289 )
278290 @ [
279291 Arms . Refractors . all(
0 commit comments