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

Yes-No-Cancel-Yes to all-No to all box visually truncates lengthy file paths #8812

Closed
sasumner opened this issue Sep 4, 2020 · 2 comments
Closed
Labels

Comments

@sasumner
Copy link
Contributor

sasumner commented Sep 4, 2020

Steps to Reproduce the Issue (STR)

  1. Get a CMD prompt
  2. Create a fairly lengthy directory path, e.g.
md w:\a123456789\b123456789\c123456789\d123456789\e123456789\f123456789\g123456789
  1. Create TWO files in this path:
echo ImFromTest1>w:\a123456789\b123456789\c123456789\d123456789\e123456789\f123456789\g123456789\test1.txt
echo ImFromTest2>w:\a123456789\b123456789\c123456789\d123456789\e123456789\f123456789\g123456789\test2.txt
  1. Open test1.txt into N++ by using File > Open and then specifying in the File name box:
w:\a123456789\b123456789\c123456789\d123456789\e123456789\f123456789\g123456789\test1.txt
  1. Modify the file's tab content in some manner, so that its tab icons turn red.
  2. Choose File > Close ; observe the appearance of this window :
    image
  3. Press the Cancel button so that test1.txt is not actually closed
  4. Open test2.txt similarly to what was done for test1.txt in step 4, by specifying in the File name box:
w:\a123456789\b123456789\c123456789\d123456789\e123456789\f123456789\g123456789\test2.txt
  1. Modify test2.txt's file's tab content in some manner, so that its tab icons turn red.
  2. Choose File > Close All ; observe the appearance of this window :
    image

Expected Behavior

I expected to see the full file path of my file when I'm prompted to save it in step 10, so I can be sure that I'm saving the intended file. I am shown the complete path in step 6; why not in step 10?

Actual Behavior

The file path of my file is truncated in step 10, so much so that I can't see the rightmost part of the path, leaving me uncertain I am saving changes to the correct file. The information should be presented more like in step 6.

Debug Information

Notepad++ v7.8.9 (32-bit)
Build time : Jul 15 2020 - 20:26:50
Path : C:\....................\npp.7.8.9.bin\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1809
OS Build : 17763.1339
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll PythonScript.dll

@eljefe7000
Copy link
Contributor

Hi @sasumner , I have a fix for this issue.

The "Close All" menu item opens a dialog box template resource (IDD_DOSAVEORNOTBOX) via the StaticDialog class. It has a static text control whose style does not match the static text control loaded by the "Close" menu item (via the ::MessageBox method). Specifically, the latter control has the SS_EDITCONTROL style (shown below), which duplicates the style of a multi-line edit control and does not display a partially visible last line. Applying the same style to the text control in IDD_DOSAVEORNOTBOX results in proper wrapping of text.

image
image

@sasumner
Copy link
Contributor Author

sasumner commented Oct 3, 2020

@eljefe7000 I haven't looked too deeply at it, but at first glimpse I have to say it looks good. :-)

@donho donho added the accepted label Oct 3, 2020
@donho donho closed this as completed in c306555 Oct 4, 2020
alef162 pushed a commit to alef162/notepad-plus-plus that referenced this issue Oct 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants