diff options
| author | Campbell Barton <ideasman42@gmail.com> | 2026-04-29 20:14:02 +1000 |
|---|---|---|
| committer | Campbell Barton <ideasman42@gmail.com> | 2026-04-29 20:14:02 +1000 |
| commit | ab412a7af647c230fa1d316dc0e6a0c289986e16 (patch) | |
| tree | ac9c88f5cc5f1c070024bc8a43dabe0807b2c63f | |
| parent | 5328269e24cf779fa244533b32e2bb4882b0c478 (diff) | |
Fix shift-number-redo skip the chain when undo is disabledexternals/shift-number
`with-command-redo-fn' raises a `user-error' when `buffer-undo-list' is t.
Detect this case and fall back to running the command directly so
shift-number still works in buffers that have undo disabled.
| -rw-r--r-- | shift-number.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shift-number.el b/shift-number.el index 9440ae8..0d81250 100644 --- a/shift-number.el +++ b/shift-number.el @@ -930,7 +930,8 @@ Works with rectangle selection when `rectangle-mark-mode' is active." PREV is the cached cumulative amount (0 on the first call). ID is the chain identifier." (cond - (shift-number-redo + ;; Skip the chain when undo is disabled in this buffer. + ((and shift-number-redo (not (eq buffer-undo-list t))) (with-command-redo-fn (list :id id) (lambda (props) |
