id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
3264	Use own screen drawing method rather than slang/ncurses	egmont		"MC currently uses either slang or ncurses for display.

It's one thing that I firmly disagree with having two choices.  It's a really minor benefit for a very few users to choose from two.  On the other hand, it's a significant developer overhead, double testing work, and source of many discrepancies between the two versions (e.g. #2164, #2291, #3114, #3158, #3254, and many more already closed bugs).  I believe developers should pick one and offer only that.  Bugs would no longer go unnoticed just because a developer used the other library, which would lead to better overall quality.

My recommendation is to not use any of these two, but to write an extremely simple basic screen handling component in mc.  (This is what quite a few apps, e.g. vim, emacs, less do.  They do rely on libtinfo [part of ncurses] for querying termcap/terminfo, but not on ncurses to draw the screen.  Sounds the most reasonable approach to me.)

Ncurses is actively maintained but is a giant bloat, containinig bugs that effect mc's behavior (e.g. the just fixed http://lists.gnu.org/archive/html/bug-ncurses/2014-08/msg00020.html, although I'm afraid it still has similar bugs).

Slang is not really maintained and haven't seen a stable release in 3+ years.

Switching to our own drawing of the screen would allow to address these issues:

- #1849: mcview understanding ANSI color escapes, work like ""less -R"". This requires to get rid of the ancient brain-damaged palette support of both ncurses and slang, and instead have each cell store its fg and bg color.

- #3145 True color support. Neither ncurses nor slang seems to want to ever address this.

- #3065 Italic text. Supported by pre-versions of both libraries, but we'll have to wait for stable ncurses-5.10 and slang-2.3 to get it ""official"" and widespread. No idea when these are going to happen.

- Strikethrough and other possible text attributes: Ncurses will not add this because the bitfield is already fully packed. No info about slang.

- #3229 Pasting with proper EOL.  Neither slang nor ncurses allows to set whether at the end of the line there's an explicit newline (to be copy-pasted) or an overflow (copy-pasting shouldn't add a newline).  Terminal emulators, however, do remember which of the two happened.  Our own layer could easily do the requested thing for every line.

- Similarly, spaces at the end of the line, or TAB characters could also be reserved for copy-paste purposes, this isn't offered either by these libraries.
"	enhancement	new	major	Future Releases	mc-tty	master			gotar@… god12@… mrmazda@…		1608, 1622, 1849, 2164, 2291, 3065, 3114, 3158, 3229, 3254, 4601	no branch	
