[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69943: 30.0.50; Tabbing through widgets can signal beginning-of-buff
From: |
Stephen Berman |
Subject: |
bug#69943: 30.0.50; Tabbing through widgets can signal beginning-of-buffer error |
Date: |
Mon, 01 Apr 2024 17:20:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
On Fri, 22 Mar 2024 17:36:31 +0200 Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Fri, 22 Mar 2024 15:45:16 +0100
>> From: Stephen Berman via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>
>> 0. emacs -Q
>>
>> 1. Evaluate the following sexp:
>>
>> (let ((buf (get-buffer-create "*Widget Test*")))
>> (switch-to-buffer buf)
>> (dolist (el '("First" "Second" "Third"))
>> (widget-create 'push-button el))
>> (use-local-map widget-keymap)
>> (widget-setup)
>> (goto-char (point-min)))
>>
>> Now the current buffer is *Widget Test* containing three push-button
>> widgets labeled "First", "Second", and "Third", and point is at the
>> start of the first widget, at BOB.
>>
>> 2. Hit the TAB key (bound to widget-forward) three times: this moves
>> point successively from "First" to "Second" to "Third" and then back to
>> "First" -- but on returning to the initial position after the third TAB,
>> a beginning-of-buffer error is also signaled.
>>
>> 3. Likewise, hitting S-TAB (bound to widget-backward) three times moves
>> backwards across the widgets, from "Third" to "Second" to "First", again
>> signaling a beginning-of-buffer error after the last S-TAB.
>>
>> These beginning-of-buffer errors are due to widget-move (the workhorse
>> behind widget-forward and widget-backward) calling backward-char in a
>> loop without checking for BOB. The attached patch fixes this. The
>> patch also includes additions to widget-test-widget-move (from which
>> most of the above sexp was taken) that test moving to a widget at BOB.
>> (If the patch is acceptable, whoever commits it should use the correct
>> bug# before pushing it, or I can do that myself.)
>
> Mauro, any comments to the proposed patch?
No comments yet, or did I miss them? If not, any objections to
installing the patch?
Steve Berman
- bug#69943: 30.0.50; Tabbing through widgets can signal beginning-of-buffer error,
Stephen Berman <=
- bug#69943: 30.0.50; Tabbing through widgets can signal beginning-of-buffer error, Eli Zaretskii, 2024/04/01
- bug#69943: 30.0.50; Tabbing through widgets can signal beginning-of-buffer error, Stephen Berman, 2024/04/01
- bug#69943: 30.0.50; Tabbing through widgets can signal beginning-of-buffer error, Eli Zaretskii, 2024/04/06
- bug#69943: 30.0.50; Tabbing through widgets can signal beginning-of-buffer error, Eli Zaretskii, 2024/04/18
- bug#69943: 30.0.50; Tabbing through widgets can signal beginning-of-buffer error, Mauro Aranda, 2024/04/18
- bug#69943: 30.0.50; Tabbing through widgets can signal beginning-of-buffer error, Eli Zaretskii, 2024/04/18
- bug#69943: 30.0.50; Tabbing through widgets can signal beginning-of-buffer error, Stephen Berman, 2024/04/18