* ivy.el (ivy--reset-state): When the region is active and "M-n" is
called, insert the region contents into the minibuffer and deactivate
the region. The region deactivation is done for `swiper', to make it
easier to search for multiple words or a subword.
coll)))
0))))
(setq ivy-exit nil)
- (setq ivy--default (or
- (thing-at-point 'url)
- (thing-at-point 'symbol)
- ""))
+ (setq ivy--default
+ (if (region-active-p)
+ (prog1 (buffer-substring
+ (region-beginning)
+ (region-end))
+ (deactivate-mark))
+ (or
+ (thing-at-point 'url)
+ (thing-at-point 'symbol)
+ "")))
(setq ivy--prompt
(cond ((string-match "%.*d" prompt)
prompt)