rizonesoft / Notepad3

Notepad like text editor based on the Scintilla source code. Notepad3 based on code from Notepad2 and MiniPath on code from metapath. Download Notepad3:
https://www.rizonesoft.com/downloads/notepad3/
Other
4.84k stars 324 forks source link

Better Contrast and an Oversight #3656

Closed WeirdOddWodd closed 1 year ago

WeirdOddWodd commented 2 years ago

image The text and insertion point for the highlighted line is almost invisible. image After selecting lines (Line 1 has the yellow background and black text (window active) or gray text (window inactive). image I observed that the digit grouper is missing here. Possible oversight observed It would also still be nice to see digit grouping in the line numbers (left side of window) and proper (binary) units for file size (status bar) (especially the latter, as using a base-10 prefix to denote change of a base-2 value is odd) (such a case would be like showing that an hour has passed after 100 minutes or that someone has accumulated a dollar after collecting 124 cents). Have a wonderful day! I installed the latest version of Notepad3 onto another computer. The text selection display problems did not occur. They also did not occur after I closed Notepad3 and opened it again on the computer which I used to submit this post. I still would appreciate the digit grouping and binary units though. 😉

RaiKoHoff commented 2 years ago

Regarding your first issue: Just use a translucency value (like it is used as default): image

For your second point, I need more details, I can't see your point. Text selection style is configurable too.

Digit grouping for the line numbers is not offered by Scintilla component, only font and foreground/background coloring is possible (or I missed something in Scintilla API documentation).

For displaying the estimated file size format, the Windows method StrFormatByteSize() is used. According to their "Remarks", Win10 seems to have changed their calculation base:

In Windows 10, size is reported in base 10 rather than base 2. For example, 1 KB is 1000 bytes rather than 1024.

A related discussion can be found here: https://randomascii.wordpress.com/2016/02/13/base-ten-for-almost-everything/ I am not going to change the current behavior. By the way, the estimated file size is calculated for saving document in UTF-8 format.

Other places for missing digit grouping can be changed. (maybe @hpwamr may help me, to identify all those places ...).

hpwamr commented 2 years ago

Other places for missing digit grouping can be changed.

After a quick check, nothing more found? 🤔

hpwamr commented 2 years ago

Hello @WeirdOddWodd

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_5.21.914.1_beta.paf" or newer, see 1st list in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_5.21.914.1_beta_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

WeirdOddWodd commented 2 years ago

After a quick check, nothing more found? 🤔

I found a missing digit grouper. 😉 The file size is missing it. I found that Notepad3 behaves as probably most other [more advanced] text editors (010 Editor is an exception.). It displays file size in the status bar. But, because it also behaves in the same manner as the aforementioned [more advanced] text editors, it changes its unit at the 1,024th byte rather than the 1,000th byte. Bytes 1,000 to 1,023 do not include digit grouping. 😉 I read through the article to which you linked about the unit mismatching. In a comment that I read, it was pointed out that we [humans] use many different systems. Given that, if you wish to avoid binary prefixes, I advise you to have your status bar show a change of unit at the 1,000th byte rather than the 1,024th. This also eliminates this component with respect to areas missing digit grouping, since a file size will not ever reach 1,000 yottabytes with current [at least, consumer-sold] devices, as doing so would require an 83-bit architecture. But, because consumer-sold devices do not run on architectures above 64 bits in width, the yottabyte will not be reached. Also, Notepad3 has historically crashed for me (probably upon file sizes exceeding 2,147,483,647 bytes [2 gibibytes - 1 bit or 2.147 483 647 gigabytes] or 2,147,483,648 bytes [2 gibibytes] anyway). I use Notepad3 mostly to work on music arrangement. ModPlug Tracker MPT |C-501...... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... |........... There is a very brief example. Oftentimes, I work with over 1,000 of those and have them pasted (via a macro) hundreds of times. While running the macro, Notepad3 has sometimes crashed. My guess is that it has a file size limitation of 2,147,483,647 bytes and that, because of how much I have the macro paste sometimes, that is exceeded, causing the crash.

Digit grouping for the line numbers is not offered by Scintilla component, only font and foreground/background coloring is possible (or I missed something in Scintilla API documentation).

I believe that you have mentioned that before. But, it was a while ago. It seems that it is still true. We’re cool here. Also, I was unaware that the colors were adjustable. That is neat.

hpwamr commented 2 years ago

Also, Notepad3 has historically crashed for me (probably upon file sizes exceeding 2,147,483,647 bytes [2 gibibytes - 1 bit or 2.147 483 647 gigabytes] or 2,147,483,648 bytes [2 gibibytes] anyway).

From version "5.20.411.2 (11 April 2020), Notepad3 can open file till 4GB. https://github.com/rizonesoft/Notepad3/issues/1713#issuecomment-595234928 and https://github.com/rizonesoft/Notepad3/pull/2016

hpwamr commented 2 years ago

I found a missing digit grouper. 😉 The file size is missing it.

Hello @WeirdOddWodd , Where do yo find the missing digit grouper in file size (which panel ?) ❔

The status bar seems ok ? 🤔

2021-09-14_181023

WeirdOddWodd commented 2 years ago

The status bar seems ok ? 🤔

Reduce your file size to between 1,000 and 1,023 bytes and look again (as it changes to “megabyte” at the 1,024th). 😉 image

WeirdOddWodd commented 2 years ago

Also, Notepad3 has historically crashed for me (probably upon file sizes exceeding 2,147,483,647 bytes [2 gibibytes - 1 bit or 2.147 483 647 gigabytes] or 2,147,483,648 bytes [2 gibibytes] anyway).

From version "5.20.411.2 (11 April 2020), Notepad3 can open file till 4GB. #1713 (comment) and #2016

Hmm Perhaps, if I tried pasting some of the music information mentioned before, it won’t crash then. I will test that. 2021-09-14 (1) Upon pasting the content again after that (Note the size label in the status bar), Notepad3 crashed. It should have displayed “2.62 ‘GB’” or “2.63 ‘GB.’” Instead, it crashed. Also, I found another set of missing digit groupers. image image The probably overlooked go to dialog It is missing digit grouping in all output fields and possibly even has a “legitimate” bug. Note the column number in the input field in screenshot 2 relative to the column “allowance” shown in parentheses. I tested the behavior with word wrap both on and off. It was unchanged.

RaiKoHoff commented 2 years ago

Notepad3 has never been designed to handle huge files, it has been designed to support human readable documents like simple ANSI/UTF-8 text files and programming code. It is a bad project design, having very large source code files. Even creating large log-files - good loggers will limit the logging to single files of convenient sizes. So Notepad3 and the basic Scintilla component is using the (limited) Windows API for handling these files in one piece. (e.g. heavy use of MultiByteToWideChar() which is limited to 2^21 characters). For reading very large files, it makes more sense to get a reader, providing views on parts of huge files, not handling them in one piece. Notepad3 has to enforce this 2GB limit to ensure a sensitive handling - I am going to limit this size in NP3. (Regarding different encoding formats, this limit will vary ... 😓)

There are special tools for working with files of sizes beyond 2GB, 4GB and more in a sensible way (Video-Editors, etc.).

hpwamr commented 2 years ago

Hello @WeirdOddWodd ,

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_5.21.915.1_beta.paf" or newer, see 1st list in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_5.21.915.1_beta_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

WeirdOddWodd commented 2 years ago

@RaiKoHoff If I am working with long music arrangements (which is almost every time 😉) (I am excited by higher numbers, especially if they happen to be prime. I have found, however, that with the software that I use, I cannot play back an audio conversion of a text file that is much longer than 2 days.), I have been limiting the line number to the lowest multiple of the number with which I am working (in row quantity) that exceeds 67,108,864 (the number of rows in 1,048,576 patterns of music).

hpwamr commented 2 years ago

I have been limiting the line number to the lowest multiple of the number with which I am working (in row quantity) that exceeds 67,108,864 (the number of rows in 1,048,576 patterns of music).

Hello @WeirdOddWodd , See my comment in issue : https://github.com/rizonesoft/Notepad3/issues/1713#issuecomment-552544639

For very large files, I recommend for example: PilotEdit 13.3.0

PilotEdit is a handy and reliable file (text- and hex-) editor designed to help users to execute scripts, extract strings and edit large files. etc...

RaiKoHoff commented 2 years ago

For estimated file size display, we will rely on the formatting (and digit grouping) of Win32 API Method StrFormatByteSize() resp. StrFormatByteSizeEx(). Despite their remark:

In Windows 10, size is reported in base 10 rather than base 2. For example, 1 KB is 1000 bytes rather than 1024.

it seems, that they still (Win10) use "1024 bytes" to jump to "1 KB" display - don't know, if they will change that if reporting this issue to Microsoft.

WeirdOddWodd commented 2 years ago

it seems, that they still (Win10) use "1024 bytes" to jump to "1 KB" display - don't know, if they will change that if reporting this issue to Microsoft.

This is quite illogical, yes. But, the logic that humans generally use is certainly quite different from that which programming languages use, notably with Boolean operators. It does seem that linguistic rooting is not used as it once was (since “kilo-” [originally used to denote 1,000 of a given unit {Henceforth, a kilometer = 1,000 meters.}] has come to being equated with “kibi [which is probably intended to stand for “binary kilo” {henceforth “kibi”}] (also, henceforth, 1,024 units, as 1,024 is a power of 2, while 1,000 is a power of 10, not 2). But, as you remarked, submitting the argument to Microsoft would probably not go far.

WeirdOddWodd commented 2 years ago

image I have observed a singular-plural mismatch in the replace dialog with a quantity of 1 object being replaced. Removing the s from “occurrences” and replacing “have” with has is recommended. Also, the splash screen for the portable version of Notepad 3 looks neat. I downloaded the beta for version 5.21.915.1 today because I had observed the singular-plural mismatch in an earlier version and was curious if that was fixed. It was not.

RaiKoHoff commented 2 years ago

@hpwamr : Maybe a compromise here: Instead of using expensive case switching and duplication (98%) of resource strings, how about changing string to "%i occurrence(s) of specified search pattern replaced!". Other suggestion for not splitting into 2 strings here?

hpwamr commented 2 years ago

how about changing string to "%s occurrence(s) of specified search pattern replaced!"

Hi @RaiKoHoff , Yes, I agree with this "%s occurrence(s)" But, it remaims a problem with the verb "has or have" 😬 Maybee changes the sentence as: "%s occurrence(s) of the specified text replaced." or "...search pattern replaced." 🤔

WeirdOddWodd commented 2 years ago

Using the (s) notation certainly keep your application mainstream since adjusting to reflect singular or plural as would generally be done in speech is generally not done (as a person outside of a screen reader would not generally say “object parentheses ess”) (but screen readers do) (Although, the person might say “object or objects.”) (Although, that is generally done with an unknown quantity.) 🤣 Whew, semantics — those are tough to “nail” sometimes. 0꞉ The Grammatical, “Oddball”꞉.txt There is a document in which I write about some of the odd semantic dealings that we are facing here. 😊

RaiKoHoff commented 2 years ago

Hi @hpwamr, as the head of the internationalization of NP3, feel free to change the used string(s). My preference is only "search pattern" instead of "text". @WeirdOddWodd : Nice reading "The Grammatical, 'Oddball'" , nature of the number 0. So , even with 0, we are fine with "%i occurrence(s) ...".

WeirdOddWodd commented 2 years ago

@RaiKoHoff I am glad that you liked the reading about 0. Using differentiation for singular and plural or simply using the (s) notation to eliminate that if construct completely is up to you. Most people do not pay much detail to semantics. But, I find it exciting when I see those rare cases of differentiating singular and plural or, much rarer, proper use of singular and plural (a lack of singular-plural mismatches) (An example of a singular-plural mismatch is following a singular object by a plural term [usually they or their] or, as I mentioned in the document about 0, the probably much older [and possibly first] and least recognized [if recognized] singular-plural mismatch — the word none [or, as it might be better spelled, given its potential lexicographical origin, n’one {a contraction for “not one”}]). Have a wonderful day!