mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-08 15:35:02 +00:00
Fix infloop in shell.el
* test/lisp/shell-tests.el (shell-tests-completion-before-semi): Amend the shell.el tests to catch errors such as bug#39057. * lisp/shell.el (shell--parse-pcomplete-arguments): Skip the semi-colon as well. This avoids inflooping when a semi-colon is typed by the user. (Bug#39057) Copyright-paperwork-exempt: yes
This commit is contained in:
parent
74b151195d
commit
4217bc229b
@ -428,7 +428,7 @@ Thus, this does not include the shell's current directory.")
|
||||
(save-excursion
|
||||
(goto-char begin)
|
||||
(while (< (point) end)
|
||||
(skip-chars-forward " \t\n")
|
||||
(skip-chars-forward " \t\n;")
|
||||
(push (point) begins)
|
||||
(let ((arg ()))
|
||||
(while (looking-at
|
||||
|
@ -34,8 +34,7 @@
|
||||
(with-temp-buffer
|
||||
(shell-mode)
|
||||
(insert "cd ba;")
|
||||
(forward-char -1)
|
||||
(should (equal (shell--parse-pcomplete-arguments)
|
||||
'(("cd" "ba") 1 4)))))
|
||||
'(("cd" "ba" "") 1 4)))))
|
||||
|
||||
;;; shell-tests.el ends here
|
||||
|
Loading…
Reference in New Issue
Block a user