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

clink-popup-* windows can truncate text unnecessarily when there's only one column #579

Closed
kahlkevin opened this issue Mar 23, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@kahlkevin
Copy link

kahlkevin commented Mar 23, 2024

Tested Version Clink v1.6.9.242b68 (although this repros with earlier versions)
Tested Commands clink-popup-history, clink-popup-directories

Repro

  1. Navigate to some long directory path (like, say, 25-50 characters long) -- or -- Create a long-ish command history entry
  2. Type a couple or few characters that you know are present in the history entry created in step 1
  3. Activate clink-popup-directories or clink-popup-history

Result

Popup window appears but is rather narrow. Text is unnecessarily truncated within view.

Expect

A much wider popup window.

Note

This does not repro if you skip step 2 (no search filter). The resulting popup is much wider and avoids truncation.

@chrisant996
Copy link
Owner

chrisant996 commented Mar 23, 2024

@kahlkevin I can't reproduce the issue.

image

Can you share a screenshot?
Can you narrow down more specific steps?

@chrisant996 chrisant996 added the needs more information The issue needs clarifying information label Mar 23, 2024
@chrisant996
Copy link
Owner

chrisant996 commented Mar 23, 2024

@kahlkevin Ah, but this part I can repro:

image

Debugging...

UPDATE: The window width is exactly correct in this repro, but the column's text was truncated prematurely because the code accidentally reserved space for multiple columns even when there was only 1 column. I still can't yet reproduce a case where the popup window is narrower than it should be.

chrisant996 added a commit that referenced this issue Mar 23, 2024
Space was reserved for multiple columns when only 1 column was present.

Found while investigating #579.
@chrisant996
Copy link
Owner

@kahlkevin The same truncation could happen in the history popup list, if timestamps are not shown (thus it would accidentally reserve room for 2 columns even though there's only 1 column).

image

But I don't see any way for the window width to be too narrow: the window width is the length of the longest entry, or the width of the screen, whichever is smaller.

Could it have been an optical illusion that the window was overly narrow?

@chrisant996 chrisant996 added the bug Something isn't working label Mar 23, 2024
@chrisant996
Copy link
Owner

@kahlkevin I'm pretty sure the window width is correct, and that only the text within the window was truncated unnecessarily. I'll close this issue for now, but please double check and report back if the window width itself is wrong.

@chrisant996 chrisant996 changed the title clink-popup-* windows are unnecessarily narrow and truncate the search text when opened with an initial search clink-popup-* windows can truncate text unnecessarily when there's only one column Mar 23, 2024
@kahlkevin
Copy link
Author

Yep, I agree that it's possible I was commenting upon an optical illusion (w.r.t. the overall window width) and am completely supportive of your issue title change.

However: unfortunately, this still repros for me with 1.6.10...

@chrisant996
Copy link
Owner

Yep, I agree that it's possible I was commenting upon an optical illusion (w.r.t. the overall window width) and am completely supportive of your issue title change.

However: unfortunately, this still repros for me with 1.6.10...

Interesting! Can you share more information?

  • screen shot
  • more specific details about steps
  • output from clink info
  • contents of the clink.log (its location is listed in the output from clink info).

@kahlkevin
Copy link
Author

kahlkevin commented Mar 25, 2024

  • Screenshot sent via private message (using the email address displayed in your GitHub profile).
  • I'm not sure how to be more specific about steps without guidance. I have a large history, and it's the filter characters typed before command activation that seem key to the repro. Please advise if there are more specific questions I can answer.
  • clink info yields:
version  : 1.6.10.d5dce0
session  : 20168
injected : C:\Users\kkahl\AppData\Local\Temp\clink\dll_cache\1.6.9.242b68_70f2e7d0\clink_dll_x64.dll (1.6.9)
binaries : C:\util\clink
state    : C:\Users\kkahl\AppData\Local\clink
log      : C:\Users\kkahl\AppData\Local\clink\clink.log
settings : C:\Users\kkahl\AppData\Local\clink\clink_settings
history  : C:\Users\kkahl\AppData\Local\clink\clink_history
scripts  : C:\util\clink ; C:\Users\kkahl\AppData\Local\clink ; C:\Users\kkahl\clink-completions
inputrc  : %clink_inputrc%
             (unset)
         : state directory
             C:\Users\kkahl\AppData\Local\clink\.inputrc
             C:\Users\kkahl\AppData\Local\clink\_inputrc
         : %userprofile%
             C:\Users\kkahl\.inputrc   (LOAD)
             C:\Users\kkahl\_inputrc
         : %localappdata%
             C:\Users\kkahl\AppData\Local\.inputrc
             C:\Users\kkahl\AppData\Local\_inputrc
         : %appdata%
             C:\Users\kkahl\AppData\Roaming\.inputrc
             C:\Users\kkahl\AppData\Roaming\_inputrc
         : %home%
             C:\Users\kkahl\.inputrc   (exists)
             C:\Users\kkahl\_inputrc
system   : 10.0.26085.1
codepage : 1252
keyboard langid : 1033
keyboard layout : 00000409

@kahlkevin
Copy link
Author

kahlkevin commented Mar 25, 2024

Ah, nevermind. False alarm. Now I see the problem: the old version of clink_dll_x64.dll was still in use. After closing and re-opening the shell command prompt, the issue is fixed.

Thanks!

@chrisant996
Copy link
Owner

Ah, nevermind. False alarm. Now I see the problem: the old version of clink_dll_x64.dll was still in use. After closing and re-opening the shell command prompt, the issue is fixed.

Ah, that's good news. Thanks for returning the issues, and thanks for the update!

@chrisant996 chrisant996 removed the needs more information The issue needs clarifying information label Apr 24, 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

2 participants