[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36034: [PATCH] Zsh extended_history shows up in comint input ring
From: |
Lars Ingebrigtsen |
Subject: |
bug#36034: [PATCH] Zsh extended_history shows up in comint input ring |
Date: |
Tue, 25 Jun 2019 13:05:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Matthew Bauer <mjbauer95@gmail.com> writes:
> - (match-end 0)
> - (point-min)))
> + (progn
> + (when (and
> + comint-input-ring-file-prefix
> + (looking-at (concat
> comint-input-ring-separator
> +
> comint-input-ring-file-prefix)))
> + ;; Skip zsh extended_history stamps
> + (re-search-forward
> comint-input-ring-file-prefix
> + nil t))
> + (match-end 0))
>
> The re-search-forward here doesn't seem necessary -- can't you just go
> to (match-end 0) here instead?
>
> Without re-search-forward, the “start” integer would just be the character
> right after the newline. re-search-forward skips that prefix.
You first do a
(looking-at (concat comint-input-ring-separator comint-input-ring-file-prefix)))
and then
(re-search-forward comint-input-ring-file-prefix)
This will make point end up at where (match-end 0) would be after the
looking-at, surely?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no