The cause for this seems to be in ncurses directly. In the definition of tgetstr in lib_termcap.c there's a check for ValidExt for any non-standard terminfo entries. This macro fails when fetching an entry that is longer than 2 characters, meaning tgetstr for "smxx" fails and I get no underlines. I've managed to fix this by using tigetstr in-place of tgetstr (this variant is also used for querying the setf24 and setb24 termcaps already in "term.c" so I suspect this is a known issue). I'm not sure what the termcap library does but I'm guessing it doesn't have this restriction. Please fix this by switching to tigetstr instead of tgetstr for this record when building with terminfo. I've got a sample patch for this attached.