GNU bug report logs - #76679
31.0.50; forward-sentence not working in the narrowed buffer under c-ts-mode

Previous Next

Package: emacs;

Reported by: lorniu <lorniu <at> gmail.com>

Date: Sun, 2 Mar 2025 10:23:02 UTC

Severity: normal

Tags: moreinfo

Merged with 76497

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76679 <at> debbugs.gnu.org, lorniu <at> gmail.com, casouri <at> gmail.com
Subject: bug#76679: 31.0.50; forward-sentence not working in the narrowed buffer under c-ts-mode
Date: Thu, 13 Mar 2025 20:45:09 +0200
merge 76679 76497
close 76679 31.0.50
thanks

> @@ -3417,9 +3417,10 @@ treesit-forward-sentence
>  by `text' and `sentence' in `treesit-thing-settings'."
>    (if (treesit-node-match-p (treesit-node-at (point)) 'text t)
>        (funcall #'forward-sentence-default-function arg)
> -    (funcall
> -     (if (> arg 0) #'treesit-end-of-thing #'treesit-beginning-of-thing)
> -     'sentence (abs arg))))
> +    (or (funcall
> +         (if (> arg 0) #'treesit-end-of-thing #'treesit-beginning-of-thing)
> +         'sentence (abs arg))
> +        (goto-char (if (> arg 0) (point-max) (point-min))))))

Actually this is not so simple, because also need to handle
range boundaries as well.  So pushed the change that stops
at the 'treesit-parser' overlay's end.




This bug report was last modified 70 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.