Fix out-of-bounds error in doom/backward-delete-whitespace-to-column
This commit is contained in:
parent
62e906cf19
commit
2eafdc8c6f
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ possible, or just one char if that's not possible."
|
||||||
(setq movement tab-width))
|
(setq movement tab-width))
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(if (string-match "\\w*\\(\\s-+\\)$"
|
(if (string-match "\\w*\\(\\s-+\\)$"
|
||||||
(buffer-substring-no-properties (- p movement) p))
|
(buffer-substring-no-properties (max (point-min) (- p movement)) p))
|
||||||
(delete-char (- 0 (- (match-end 1) (match-beginning 1))))
|
(delete-char (- 0 (- (match-end 1) (match-beginning 1))))
|
||||||
(call-interactively 'delete-backward-char)))))
|
(call-interactively 'delete-backward-char)))))
|
||||||
;; Otherwise do a regular delete
|
;; Otherwise do a regular delete
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue