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
2 changed files with 2 additions and 3 deletions
|
@ -428,7 +428,7 @@ Thus, this does not include the shell's current directory.")
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char begin)
|
(goto-char begin)
|
||||||
(while (< (point) end)
|
(while (< (point) end)
|
||||||
(skip-chars-forward " \t\n")
|
(skip-chars-forward " \t\n;")
|
||||||
(push (point) begins)
|
(push (point) begins)
|
||||||
(let ((arg ()))
|
(let ((arg ()))
|
||||||
(while (looking-at
|
(while (looking-at
|
||||||
|
|
|
@ -34,8 +34,7 @@
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(shell-mode)
|
(shell-mode)
|
||||||
(insert "cd ba;")
|
(insert "cd ba;")
|
||||||
(forward-char -1)
|
|
||||||
(should (equal (shell--parse-pcomplete-arguments)
|
(should (equal (shell--parse-pcomplete-arguments)
|
||||||
'(("cd" "ba") 1 4)))))
|
'(("cd" "ba" "") 1 4)))))
|
||||||
|
|
||||||
;;; shell-tests.el ends here
|
;;; shell-tests.el ends here
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue