@@ -1349,18 +1349,45 @@ Argument REVERSE if selection is reversed."
1349
1349
The input will be pushed into `regexp-search-ring' . So
1350
1350
\\ [meow-search] can be used for further searching with the same condition.
1351
1351
1352
- A list of words and symbols in the current buffer will be provided for completion.
1353
- To search for regexp instead, set `meow-visit-sanitize-completion' to nil.
1354
- In that case, completions will be provided in regexp form, but also covering
1352
+ When `meow-prompter' is `completion' (the default), a list of
1353
+ words and symbols in the current buffer will be provided for
1354
+ completion. To search for a regexp instead, set
1355
+ `meow-visit-sanitize-completion' to nil. In that case,
1356
+ completions will be provided in regexp form, but also covering
1355
1357
the words and symbols in the current buffer.
1356
1358
1359
+ When `meow-prompter' is `buffer-highlight' , matches are
1360
+ highlighted in the current buffer from point until then end of
1361
+ the visible text. When `meow-visit-sanitize-completion' is
1362
+ non-nil, only whole words and symbols are highlighted, and the
1363
+ input is treated literally. When `meow-beacon-mode' is active
1364
+ and point is inside the secondary selection, matches back to the
1365
+ start or end of the selection are highlighted, depending on whether
1366
+ `meow-visit' is searching backward or forward.
1367
+
1357
1368
To search backward, use \\ [negative-argument]."
1358
1369
(interactive " P" )
1359
1370
(let* ((reverse arg)
1360
1371
(pos (point ))
1361
- (text (meow--prompt-symbol-and-words
1362
- (if arg " Visit backward: " " Visit: " )
1363
- (point-min ) (point-max )))
1372
+ (prompt (if reverse " Visit backward: " " Visit: " ))
1373
+ (text (pcase meow-visit-prompter
1374
+ ('buffer-highlight
1375
+ (apply #'meow--prompt-buffer-highlight
1376
+ prompt
1377
+ (let* ((ov-start (overlay-start mouse-secondary-overlay))
1378
+ (ov-end (overlay-end mouse-secondary-overlay))
1379
+ (use-sec (and (meow-beacon-mode-p)
1380
+ (secondary-selection-exist-p )
1381
+ (>= pos ov-start)
1382
+ (< pos ov-end))))
1383
+ (if reverse
1384
+ (list (window-start (selected-window ))
1385
+ (if use-sec ov-end pos))
1386
+ (list (if use-sec ov-start pos)
1387
+ (window-end (selected-window )))))))
1388
+ ((or 'completion _)
1389
+ (meow--prompt-symbol-and-words prompt
1390
+ (point-min ) (point-max )))))
1364
1391
(visit-point (meow--visit-point text reverse )))
1365
1392
(if visit-point
1366
1393
(let* ((m (match-data ))
0 commit comments