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

Cursor on column 0 of non empty line is not displayed #3271

Closed
notorand-it opened this issue May 15, 2024 · 6 comments
Closed

Cursor on column 0 of non empty line is not displayed #3271

notorand-it opened this issue May 15, 2024 · 6 comments
Labels
C-bug Category: bug - something isn't working as it's supposed to

Comments

@notorand-it
Copy link

Lapce Version

0.4.0

System information

OS: ArchLinux (up-to-date)
Kernel Version : 6.8.9.zen1-2
Plasma Version : 6.0.4.1-1
KDE Version : 24.02.2-1
Frameworks Version : 6.2.0-1
Qt5 Version : 5.15.13+kde+r7-1
Qt6 Version : 6.7.0-6
Wayland Version : 1.22.0-1
XOrg/Wayland Version : 23.2.6-2
Mesa Version : 1:24.0.7-3
LibVA Version : 2.21.0-1
VDPAU Version : 1.5-2

Describe the bug

When cursor is on the first column (0) of a non empty line, the cursor IS NOT displayed.
When cursor is on the first column (0) of an empty line, the cursor IS displayed.

Additional information

SHOT-20240515-091215-CEST

@notorand-it notorand-it added the C-bug Category: bug - something isn't working as it's supposed to label May 15, 2024
@notorand-it
Copy link
Author

The bug is actually different from what I have described.
This is my (currently) more precise description.

The cursor is actually displayed but, if you are inside a "code block", the vertical line drawn to highlight the code block extent almost completely hide the cursor if it is a "line" cursor.

Additional information

As a possible solution workaround you could not draw that vertical line highlighting the block if the cursor would be hidden. Or use a fainter shade of gray for that line.

In the following screenshot you can actually see the cursor if you squint your eyes.

The meaning of that "Char 45" is uncertain. Maybe it is the 45th since the beginning of the file.

SHOT-20240515-093850-CEST

@panekj
Copy link
Collaborator

panekj commented Jun 3, 2024

What settings you have applied?

@notorand-it
Copy link
Author

I reinstalled everything and didn't install lapce yet (using kate ATM).
I was using a rather default setup with code blocks and dark theme.
I will reinstall it as soon as a new build will pop up in ArchLinux to check the other bug I reported (#3272).

The cursor is actually displayed but, if you are inside a "code block", the vertical line drawn to highlight the code block extent almost completely hide the cursor if it is a "line" cursor.

The cursor is just barely viewable (by me) as a faint bluish bar overlapping the grayish vertical bar used to highlight the "{...}" (please, squint you eyes on my screenshot).

I think we need need either a thicker bar cursor (when highlighting code blocks), or a brighter color for it or, better, both.

@panekj
Copy link
Collaborator

panekj commented Jun 6, 2024

Default:
image

With Highlight Scope Lines enabled
image

@notorand-it
Copy link
Author

Yes, you see, with "Highlight Scope Lines" a beam cursor vanishes in a pale shade.
But also with Default setting the cursor is not at its best visibility.

@Long0x0
Copy link
Contributor

Long0x0 commented Jun 6, 2024

Cursor's x < 0 at the first column, so only half of it is shown.
https://github.com/lapce/floem/blob/e647fa442332735aca782d21ce13a3deabad20d5/src/views/editor/view.rs#L1059

vscode just offset the first one by 1px:
image

But it's not perfect :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug - something isn't working as it's supposed to
Projects
None yet
Development

No branches or pull requests

3 participants