Bug 193685 - sysutils/tmux linked against base ncurses causes display errors
Summary: sysutils/tmux linked against base ncurses causes display errors
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Mathieu Arnold
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-16 15:40 UTC by Vick Khera
Modified: 2015-02-17 13:49 UTC (History)
3 users (show)

See Also:


Attachments
make tmux port honor USES=ncurses (1.19 KB, patch)
2014-09-16 16:39 UTC, Vick Khera
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vick Khera 2014-09-16 15:40:44 UTC
Ever since tmux was updated from 1.6 to 1.7 (still affects 1.9a), running the jove editor inside tmux causes the display to overwrite characters even though within the editor it is inserting them.

I reported this as a bug to tmux a couple of years ago, but it was closed and nobody over there seems to be able to reproduce it on any other system, and neither can I. The original bug is here: https://sourceforge.net/p/tmux/tickets/3/

The following sequence of events demonstrates the error.
 * start tmux
 * edit a file using jove. type some text. it should insert correctly. quit jove.
 * type "clear" to clear the screen
 * edit the file using jove. type some text. it now does overwrite of the text on screen, but is in fact doing insert on the file. refresh the screen (ctrl-l) and it repaints the full screen and shows the correct content.

In tmux 1.6 this works fine. In tmux 1.7 and newer, you see the overwrite effect after the "clear".

I've tried all sorts of ways to make it work and make it fail, and I've narrowed it down to issuing the "clear" to the terminal inside of tmux.

I am able to "fix" the problem by linking tmux against the ncurses from ports, version 5.9.20140823, using a libmap.conf setting:

 [tmux]
 libncurses.so.8	libncurses.so.5


I suppose technically this should be a bug against base, but my problem would be solved if tmux could link against ncurses from ports instead of base.
Comment 1 Vick Khera 2014-09-16 15:43:13 UTC
I observe this failure on FreeBSD 9.3 and 10.0.
Comment 2 Vick Khera 2014-09-16 16:39:24 UTC
Created attachment 147382 [details]
make tmux port honor USES=ncurses

I made a patch to the tmux port to have it use the USES=ncurses option so it can be built with the base or the port ncurses as desired, working around my issue.

I did not make the default be the port ncurses, but I think it probably should.
Comment 3 Marcus von Appen freebsd_committer freebsd_triage 2014-09-17 16:57:40 UTC
Over to maintainer
Comment 4 Pietro Cerutti freebsd_committer 2014-11-06 13:35:13 UTC
So, is this a bug with our imported version of ncurses? I'm CC'ing delphij, maybe he has a better clue.
Comment 5 Mathieu Arnold freebsd_committer 2014-12-10 23:03:11 UTC
new maintainer
Comment 6 Vick Khera 2015-01-27 16:41:05 UTC
Hi, can I get a commit on this? Or a comment on why not?
Comment 7 Mathieu Arnold freebsd_committer 2015-01-27 21:25:11 UTC
(In reply to Vick Khera from comment #6)
Haven't gotten around to it, sorry, will try to see tomorrow.
Comment 8 commit-hook freebsd_committer 2015-02-17 13:43:06 UTC
A commit references this bug:

Author: mat
Date: Tue Feb 17 13:42:58 UTC 2015
New revision: 379161
URL: https://svnweb.freebsd.org/changeset/ports/379161

Log:
  Fix some bug regarding curses.

  PR:		193685
  Submitted by:	Vick Khera
  Sponsored by:	Absolight

Changes:
  head/sysutils/tmux/Makefile
  head/sysutils/tmux/files/patch-configure
Comment 9 Mathieu Arnold freebsd_committer 2015-02-17 13:43:28 UTC
Sorry it took so long to get to tomorrow :-)
Comment 10 Pietro Cerutti freebsd_committer 2015-02-17 13:49:11 UTC
Thanks Mat!