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

Rendered lines disappear when CRLF is present #57

Closed
hymkor opened this issue Jul 4, 2024 · 5 comments
Closed

Rendered lines disappear when CRLF is present #57

hymkor opened this issue Jul 4, 2024 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@hymkor
Copy link

hymkor commented Jul 4, 2024

Description of the bug

  • OS: Windows 11 , Terminal: both WindowsTerminal and Command Prompt
  • The version of scm-record: the executable built with the latest commit ( 8df3f45 )
  • The colored line terminating with CRLF disappears when cursor moves there (NG)

scm-record-20240705

first.txt
second.txt

Expected behavior

Whether line terminates with LF or CRLF, the text where cursor exists does not disappear.

Actual behavior

  • The colored line terminating with CRLF disappears when cursor moves there (NG)
  • When line terminates with only LF, the line does not disappear. (OK)

Version of rustc

rustc 1.74.1 (a28077b28 2023-12-04)

@hymkor hymkor added the bug Something isn't working label Jul 4, 2024
@s4uliu5
Copy link

s4uliu5 commented Jul 6, 2024

The same issue exists on Linux (e.g. Manjaro Linux) too -- scm-diff-editor (8df3f45) behaves exactly the same (lines just disappear).

@arxanas arxanas changed the title The colored line terminating with CRLF disappears when cursor moves there (Windows) Rendered lines disappear when CRLF is present Jul 7, 2024
@arxanas
Copy link
Owner

arxanas commented Jul 7, 2024

I put up #61 for this. I'm not sure what the best way is to decide if a character is non-printing. I checked if the Unicode width is zero.

@s4uliu5
Copy link

s4uliu5 commented Jul 8, 2024

0d59b0f fixed the issue for me 😄

@hymkor
Copy link
Author

hymkor commented Jul 9, 2024

I confirmed that it was fixed after git pull && cargo build --release.
And jj split by jj 0.19 with new scm-diff-editor.exe as a add-on also works as I expected.

@arxanas , @s4uliu5 , thank you !

@hymkor hymkor closed this as completed Jul 11, 2024
@arxanas arxanas added this to the v0.4.0 milestone Oct 9, 2024
@arxanas arxanas pinned this issue Oct 9, 2024
@arxanas
Copy link
Owner

arxanas commented Oct 9, 2024

I released scm-record v0.4.0; still need to upstream the version update to jj.

@arxanas arxanas unpinned this issue Dec 27, 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

3 participants