Ticket #229 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

ncurses "default color" change to -1 when available

Reported by: robert.david.public@… Owned by: andrew_b
Priority: major Milestone: 4.7
Component: mc-core Version: 4.6.2
Keywords: commited-master Cc:
Blocked By: Blocking:
Branch state: Votes for changeset:

Description (last modified by metux) (diff)

When using ncurses, there is problem with setting default color to transparent on capable terminals. This is caused by color index going from 0+ but the default terminal color is -1 in ncurses. So mc doesnt show true default color, but BLACK.

This also has to be dependant on terminal support, if it supports default colors or not. Good inspiration about this is in htop source -> CRT.c -> CRT_setColors



ncurses_default_color_fix.patch (498 bytes) - added by Robert 8 years ago.
Ncurses fix default color patch

Change History

Changed 8 years ago by Robert

Ncurses fix default color patch

comment:1 Changed 8 years ago by metux

  • Keywords review added
  • Description modified (diff)
  • Milestone changed from 4.7 to 4.6.3

as its a bug, moving to 4.6.3

comment:2 Changed 8 years ago by metux

  • Status changed from new to accepted
  • Keywords vote-metux added
  • Owner set to metux

comment:3 Changed 8 years ago by metux

  • Keywords rework added; review vote-metux removed

Segfaults, but might be an ncurses bug.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7b896c0 (LWP 1690)]
0xb7bfa80e in assume_default_colors () from /lib/libncurses.so.5
(gdb) backtrace
#0 0xb7bfa80e in assume_default_colors () from /lib/libncurses.so.5
#1 0xb7bd9c10 in ?? () from /lib/libncurses.so.5
#2 0xb7c18ff4 in ?? () from /lib/libncurses.so.5
#3 0xb7f51ca0 in ?? () from /lib/ld-linux.so.2
#4 0xbff51480 in ?? ()
#5 0xbff51418 in ?? ()
#6 0xb7f4a1a0 in ?? () from /lib/ld-linux.so.2
#7 0xb7bfa944 in use_default_colors () from /lib/libncurses.so.5
#8 0xffffffff in ?? ()
#9 0xb7d46ff4 in ?? () from /lib/libc.so.6
#10 0x08060924 in init_colors ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

comment:4 Changed 8 years ago by andrew_b

  • Status changed from accepted to assigned
  • Keywords review added; rework removed
  • Version changed from 4.6.1 to 4.6.2
  • Owner changed from metux to andrew_b

Rebased to current mc-4.6.

Please review.

No segmentation fault for me.

comment:6 Changed 7 years ago by slavazanko

  • Milestone changed from to 4.7

comment:7 Changed 7 years ago by slavazanko

  • Keywords vote-slavazanko added

branch now rebased to master.

Looks good. No coredumps.

comment:8 Changed 7 years ago by angel_il

  • Keywords vote-angel_il added

comment:9 Changed 7 years ago by slavazanko

  • Keywords approved added; review removed

comment:10 Changed 7 years ago by andrew_b

  • Keywords commited-master added; vote-slavazanko vote-angel_il approved removed
  • Status changed from assigned to testing
  • Resolution set to fixed

comment:11 Changed 7 years ago by angel_il

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.