Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed freezing emacs when no input is provided to the meow-visit minibuffer #602

Merged
merged 6 commits into from
Jun 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions meow-command.el
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
(meow--with-selection-fallback
(cond
((equal '(expand . join) (meow--selection-type))
(delete-indentation nil (region-beginning) (region-end)))

Check warning on line 259 in meow-command.el

View workflow job for this annotation

GitHub Actions / check (26.3, true)

delete-indentation called with 3 arguments, but accepts only 0-1
(t
(meow--prepare-region-for-kill)
(meow--execute-kbd-macro meow--kbd-kill-region)))))))
Expand All @@ -271,7 +271,7 @@
(meow--with-selection-fallback
(cond
((equal '(expand . join) (meow--selection-type))
(delete-indentation nil (region-beginning) (region-end)))

Check warning on line 274 in meow-command.el

View workflow job for this annotation

GitHub Actions / check (26.3, true)

delete-indentation called with 3 arguments, but accepts only 0-1
(t
(meow--prepare-region-for-kill)
(let ((s (buffer-substring-no-properties (region-beginning) (region-end))))
Expand Down Expand Up @@ -1314,7 +1314,7 @@
;;; VISIT and SEARCH
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun meow-search (arg)

Check warning on line 1317 in meow-command.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

docstring wider than 80 characters
" Search and select with the car of current `regexp-search-ring'.

If the contents of selection doesn't match the regexp, will push it to `regexp-search-ring' before searching.
Expand Down Expand Up @@ -1377,7 +1377,7 @@
(or (funcall func text nil t 1)
(funcall func-2 text nil t 1)))))

(defun meow-visit (arg)

Check warning on line 1380 in meow-command.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

docstring wider than 80 characters
"Read a string from minibuffer, then find and select it.

The input will be pushed into `regexp-search-ring'. So
Expand All @@ -1395,7 +1395,7 @@
(text (meow--prompt-symbol-and-words
(if arg "Visit backward: " "Visit: ")
(point-min) (point-max)))
(visit-point (meow--visit-point text reverse)))
(visit-point (if (string-empty-p text) nil (meow--visit-point text reverse))))
(if visit-point
(let* ((m (match-data))
(marker-beg (car m))
Expand All @@ -1409,7 +1409,7 @@
(meow--ensure-visible)
(meow--highlight-regexp-in-buffer text)
(setq meow--dont-remove-overlay t))
(message "Visit: %s failed" text))))
(message "Visit: %s failed" (if (string-empty-p text) "<empty>" text)))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; THING
Expand Down Expand Up @@ -1779,8 +1779,8 @@
(cmd (key-binding key)))
(if-let ((dispatch (and (commandp cmd)
(get cmd 'meow-dispatch))))
(describe-key (kbd dispatch) buffer up-event)

Check warning on line 1782 in meow-command.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

describe-key called with 3 arguments, but accepts only 1-2
(describe-key key-list buffer up-event)))

Check warning on line 1783 in meow-command.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

describe-key called with 3 arguments, but accepts only 1-2

Check warning on line 1783 in meow-command.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

describe-key called with 3 arguments, but accepts only 1-2
;; for mouse events
(describe-key key-list buffer up-event)))

Expand Down Expand Up @@ -1811,3 +1811,3 @@

(provide 'meow-command)
;;; meow-command.el ends here
Loading