Fix cursor misaligned: add cursor offset#61
Merged
rexim merged 2 commits intotsoding:masterfrom Feb 16, 2023
Merged
Conversation
Adds an offset to the cursor and the selected text in editor mode, as well as the selected file in file browser mode. The offset is a constant defined in `src/common.h` that is added to the y coordinate of the respective cursor when being rendered.
Contributor
|
Could this constant be derived from font metrics to support user customizable fonts in the future? |
Contributor
Author
|
Well, I already tested the cursor offset with other fonts (Ubuntu Mono, JetBrains, FiraCode) and the offset looks good in all cases. I leave you some screenshots:
I did notice though, that in some fonts (for example Victor Mono) there are characters bigger than the cursor, so maybe what you are saying applies when the cursor size is being computed? |
Member
|
@mjkloeckner looks good to me! 👍 Thank you for your contribution! |
BillKek
added a commit
to BillKek/ded_old_msys2
that referenced
this pull request
Feb 16, 2023
commit 759c476 Merge: 2993903 563b2fc Author: Alexey Kutepov <reximkut@gmail.com> Date: Thu Feb 16 15:26:42 2023 +0700 Merge pull request tsoding#71 from tsoding/update-ubuntu-ci Update ubuntu CI commit 563b2fc Author: rexim <reximkut@gmail.com> Date: Thu Feb 16 15:23:18 2023 +0700 Bump ubuntu-18.04 -> ubuntu-22.04 commit 2993903 Author: rexim <reximkut@gmail.com> Date: Thu Feb 16 15:22:19 2023 +0700 Introduce fonts/ folder commit ef77dd3 Merge: 305baf7 f62caa5 Author: Alexey Kutepov <reximkut@gmail.com> Date: Thu Feb 16 15:20:57 2023 +0700 Merge pull request tsoding#48 from BillKek/20230112 sh script to compile editor (with F3 capability) in windows executable commit 305baf7 Merge: 8b684c9 8bf6954 Author: Alexey Kutepov <reximkut@gmail.com> Date: Thu Feb 16 15:11:50 2023 +0700 Merge pull request tsoding#57 from jayhawker6/patch-1 Fix error message typos, consistent messages commit 8b684c9 Merge: fb33ce6 e28ae54 Author: Alexey Kutepov <reximkut@gmail.com> Date: Thu Feb 16 15:10:28 2023 +0700 Merge pull request tsoding#61 from mjkloeckner/cursor_offset Fix cursor misaligned: add cursor offset commit e28ae54 Merge: 5ee1d16 fb33ce6 Author: rexim <reximkut@gmail.com> Date: Thu Feb 16 15:09:04 2023 +0700 Merge branch 'master' into cursor_offset commit fb33ce6 Author: rexim <reximkut@gmail.com> Date: Thu Feb 16 15:03:56 2023 +0700 Add refactoring to the kinds of PRs I do not look into right now. commit d101988 Author: rexim <reximkut@gmail.com> Date: Thu Feb 16 15:01:17 2023 +0700 Add CONTRIBUTING.md commit 5ee1d16 Author: mjkloeckner <martin.cachari@gmail.com> Date: Thu Feb 9 19:59:43 2023 -0300 Fix cursor misaligned: add cursor offset Adds an offset to the cursor and the selected text in editor mode, as well as the selected file in file browser mode. The offset is a constant defined in `src/common.h` that is added to the y coordinate of the respective cursor when being rendered. commit 8bf6954 Author: Andrew Guernsey <75534911+jayhawker6@users.noreply.github.com> Date: Mon Jan 30 12:52:37 2023 -0600 Fix error message typos Also made some a bit more consistent with the norm format-wise. (no code/logic changes, only edited some strings that get output on errors/warnings) (Capitalized, etc.) commit f62caa5 Author: BillKek <51540758+BillKek@users.noreply.github.com> Date: Thu Jan 12 05:15:03 2023 +0300 new! works fine ! # Conflicts: # build_msys2_mingw64.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Adds an offset to the cursor and the selected text in editor mode, as well as the selected file in file browser mode.
The offset is a constant defined in
src/common.hthat is added to theycoordinate of the respective cursor when being rendered.