(interactive
(keep-lines-read-args "Keep lines (containing match for regexp): "))
(if rstart
- (goto-char (min rstart rend))
+ (progn
+ (goto-char (min rstart rend))
+ (setq rend (copy-marker (max rstart rend))))
(if (and transient-mark-mode mark-active)
(setq rstart (region-beginning)
rend (copy-marker (region-end)))
(interactive
(keep-lines-read-args "Flush lines (containing match for regexp): "))
(if rstart
- (goto-char (min rstart rend))
+ (progn
+ (goto-char (min rstart rend))
+ (setq rend (copy-marker (max rstart rend))))
(if (and transient-mark-mode mark-active)
(setq rstart (region-beginning)
rend (copy-marker (region-end)))