-
Notifications
You must be signed in to change notification settings - Fork 14
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
A few minor UI fixes #1
Conversation
Thanks a lot for the changes, this is a lot of stuff in one go :D.
I've created a new branch (merge-ellbur) to start testing this - so far I've only merged in 2 commits. |
and the word "syn" should show up in italics.
I made these changes and attached them to the pull request.
|
I've got good news and bad news: Italic:
Font check:
Alt keys:
gui_wait_for_chars:
Thanks a lot. |
2011/8/8 equalsraf
Ubuntu, using Unity desktop. I also have a highly highly custom gvim -u NONE and then I get the same behavior (ie works with the "alt hack", doesn't worth What alt combinations are you using? I primarily use Alt+n and Alt+h. I tried adding those checks in. Maybe it'll work now? Thanks for bearing with me on this :) If it's too much bother I'll
Yes. And taking the timeout out of processEvents (like you had it
|
I'm still looking into the Alt issue, but meanwhile I've merged all the other fixes into the master branch. I did some changes to the font to the font issue, to keep the same behavior as the gtk gui. |
Hey, Owen I've push a fix for Alt into a new branch tb-altkey. Can you check if it fixes you issues? Thanks |
2011/8/9 equalsraf
Yes, it works perfect.
|
Now for a longer description of the issue with the Alt modifier. The reason why I was unable to replicate this issue was because all my mappings involving the Alt key used special keys (Alt+Up, Alt+Left. etc) and these worked as intended. The problem comes up when I trigger key sequences with printable chars (Alt+n), for these combinations vim-Qt acts as if Alt was not pressed. The reason why this happens is because we split keypress events into two categories (QVimShell::keyPressEvent). The first branch handles special keys(Delete, Backspace, etc) has defined in qvimshell.h, and for this case keyboard modifiers are handled.
The second branch of the if, handles cases where the pressed key is a sequence of printable chars. The reason why I did this is because ev->text() already encodes CTRL and SHIFT modifiers in the returned string, and avoids a lot of the complexity we see in the gtk code. However the second branch does not handle ALT at all (ups I forgot :S). Hopefully the previous fix handles this properly, the ev->text() trick spares a lot of work. But also has some hidden corner cases: ev->text() can return multiple key press events at once, and I'm not sure how it handles multiple modifiers CTRL+ALT+SHIFT. I hope this clarifies things a bit. By the way, Owen where did get that fix(195, 64) from? I have yet to understand why it works :D. |
I don't know why it works either :). I got it by printfing everything that passed through add_to_input_buf() from the gtk gui. |
Also sorry to keep spamming you with changes but that un-initialized local was giving me a segfault. Also every time I push it goes into the pull request -- is that because I never closed it? I guess I should close it? |
I really don't know about the pull request - this is the first time I see one in github :D. Most likely you should create new branches for pull requests (ex: pr-issuename), since this request is associated with your master branch everything in master shows up here. As for closing the pull request, does e92bae7e876c3b8547c0 work? If it does I think it can be closed. |
2011/8/9 equalsraf
Yes, yes it does. Thank you for merging these.
|
Ok them, I'll merge the remaining changes into the master branch during today. I'm closing the pull request now. Thanks a lot for the fixes Owen, well done :D |
Hi,
First, thank you so much for making a Qt gui for Vim. I really like the look of Qt and it's nice to be able to use it with my editor.
I made a few little changes:
Best,
Owen