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

Minimum space between elastic columns not always honored (also odd cursor positioning) #19

Closed
Coises opened this issue Feb 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Coises
Copy link
Owner

Coises commented Feb 18, 2024

Starting with this file, using a monospaced font with Elastic tabs profile General enabled:

@echo off
findstr /b "o" one.obj | find /c /v ""
findstr /b "o" two.obj | find /c /v ""
findstr /b "o" three.obj | find /c /v ""
findstr /b "o" four.obj | find /c /v ""

deleting the space before the word “find” in the second line, then adding a tab, then pressing down arrow puts the cursor in the wrong position. Moving the cursor back to the space between the vertical bar and the following blank in the third line, then deleting the space causes the first tab to shrink to a single space, ignoring the “Minimum space between elastic columns” setting.

The minimum space problem appears to happen only when monospaced font optimization is in effect.

Using v1.0.3; to be verified that this is not a regression from v1.0.2.

Edit: This happens in v1.0.2 as well. The minimum space problem appears to happen only when monospaced font optimization is active; the wrong position after the first tab is entered happens in both in the specific example given above, but it is unclear exactly what circumstances trigger it in v1.0.3 (which contains a fix for this that works in most, but not all, cases).

@Coises
Copy link
Owner Author

Coises commented Feb 18, 2024

The odd cursor positioning is not related to the minimum space problem, and is hopefully fixed in v1.0.3.1.

The minimum space problem occurs only when DirectWrite is enabled. There are other problems as well; for example, text following elastic tabs does not always align with untabbed text, even though a fixed width font is in use. The cause appears to be that character and text widths in DirectWrite can be fractions of a pixel, but Scintilla only returns widths and x-positions in whole pixels. A solution is yet to be determined.

@Coises
Copy link
Owner Author

Coises commented Feb 23, 2024

This is fixed in version 1.0.4.

@Coises Coises closed this as completed Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant