lhmouse / nano-win

GNU nano text editor for Windows [WARNING: The master branch is constantly rebased and force-pushed so don't expect it to be steady!! -end WARNING]
https://files.lhmouse.com/nano-win/
GNU General Public License v3.0
210 stars 25 forks source link

Support italics #25

Closed rashil2000 closed 3 years ago

rashil2000 commented 3 years ago

Nano has had italic and bold support since 5.0. But when specifying italic in any syntax highlighting file, the text doesn't become italic.

Surprisingly, MSys2's nano doesn't have this problem.

lhmouse commented 3 years ago

Windows console does not support italic types. Only the MSYS2 terminal (mintty) has this capability.

rashil2000 commented 3 years ago

I know that. However, the ability to output italic text is independent of the terminal. Besides, the new Windows Terminal has italic support.

I tested both nano-win and Msys2-nano on all terminals (Windows Console, Windows Terminal, mintty etc.). Only Msys2-nano outputs italic characters in all terminals, and nano-win doesn't, in any terminal.

lhmouse commented 3 years ago

Maybe that's a limitation in the bundled curses library. GNU nano manipulates display via a curses library and here it is ncurses 6.1. I know no details about it but upgrading is of course worth trying. Will do later.

rashil2000 commented 3 years ago

Sure, thanks for trying!

Edit: Looks like the Msys2 Ncurses is currently at version 6.2-3.

lhmouse commented 3 years ago

Note MSYS2 nano uses the MSYS2 ncurses, which is different from a native one. They use different approaches (console drivers) to operate consoles, so (native) nano-win will not work properly in mintty.

I have uploaded a new build, but I personally do not use Windows Terminal. This editor is maintained mostly for occasional command-line editing tasks. Please test it yourself.

https://files.lhmouse.com/nano-win/nano-win_9557_v5.6.1-51-g32071383.7z

rashil2000 commented 3 years ago

This build also doesn't show italics.

Note MSYS2 nano uses the MSYS2 ncurses, which is different from a native one.

Maybe this is the reason. It might be that mingw's ncurses doesn't have italic support yet.

lhmouse commented 3 years ago

yeah that one requires msys-2.0.dll to be functional, which is a couple of MiBs larger but is of course much more versatile.

rashil2000 commented 3 years ago

Hmm, looks like this is out of scope for this project then. Should I close this issue then?

lhmouse commented 3 years ago

yes this is likely WONTFIX.