-
Notifications
You must be signed in to change notification settings - Fork 7
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
Bug: Posframe UI covers misspelled word's line #12
Comments
Thanks, I can reproduce it. Maybe this is a problem of (defun frog-menu-flyspell-correct (candidates word)
"Run `frog-menu-read' for the given CANDIDATES.
List of CANDIDATES is given by flyspell for the WORD.
Return selected word to use as a replacement or a tuple
of (command . word) to be used by `flyspell-do-correct'."
(let* ((corrects (if flyspell-sort-corrections
(sort candidates 'string<)
candidates))
(actions `(("C-s" "Save word" (save . ,word))
("C-a" "Accept (session)" (session . ,word))
("C-b" "Accept (buffer)" (buffer . ,word))
("C-c" "Skip" (skip . ,word))))
(prompt (format "Word: [%s], Dictionary: [%s]"
word
(or ispell-local-dictionary
ispell-dictionary
"default")))
(res (frog-menu-read prompt corrects actions)))
(unless res
(error "Quit"))
res)) Alternatively you could also use the side window type which does not has this problem: (setq frog-menu-type-function
(lambda () 'avy-side-window)) |
You're welcome. Maybe, but I'm afraid I've no idea. I could file an issue in Posframe tracker Thanks for the improvement of the function, I thought about having the word with
I have created a function to handle this, but your way is much better, thanks. |
Thanks, edited the example! |
Hello,
While I'm testing this package I fall into a bug causing the line where the
misspelled word to be covered with Posframe UI; that makes choosing the proper
word hard as its context is hidden.
The bug
Here are the steps to reproduce this bug:
Place source code of these libraries into
test
directory:flyspell-correct.el
.frog-menu.el
.avy.el
.posframe.el
.Launch Emacs.
C-x b
and typefoo.txt
to create a dump buffer and then hitRET
(return/enter).
Enable Flyspell mode
M-x flyspell-mode RET
.Type this in
foo.txt
buffer:Fro
<note_1>
make sure it's empty. As for<note_2>
keep hitting return orenter to make the text in line two disappear from the buffer's view.
In
<cursor_position>
, callM-x flyspell-correct-wrapper
.Notice how the line (2nd line where the text is) is covered with Posframe UI.
Notes
function as it should. Also, if the text was in first line.
avy-side-window
is acting normal, which is what I'm using now.scroll-margin
variable when it set to somethingelse than zero, but it's not.
Thank you for this package. Before this, I had to type
save
in Minibuffer as Icouldn't assign a command to type that for me in default
flyspell-correct
interface using Embark package. Anyway,
now all good with a simple keybinding
C-s
!Software info
The text was updated successfully, but these errors were encountered: