! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
terminal not wrapping to next line
Status:
RESOLVED: INVALID
Product:
Xfce4-terminal
Component:
General

Comments

Description Grant Reaber 2016-07-27 00:53:28 CEST
I am using Xfce4-terminal 0.63 in the lubuntu-desktop on Ubuntu 16.05 in VirtualBox.  I am also using this bash prompt: https://github.com/magicmonty/bash-git-prompt/
I am using the "Single_line" bash-git-prompt theme, but I think the same problem happens with all (or many) of the themes.

When typing gets to the end of the line, it just restarts at the beginning of the line.

I have searched online for a solution to this problem, and many people suggest that similar problems are caused by unprotected unprintable characters in the prompt or by not using checkwinsize.  But I am using checkwinsize and cannot find any unprotected unprintable characters in the prompt (which works in other terminals).  So I think possibly there is a problem with Xfce4-terminal, but I really don't know for sure.

My PS1: \[\033[0;32m\]✔\[\033[0;0m\] \[\033[0;37m\]$(date +%H:%M)\[\033[0;0m\] \[\033[1;33m\]\w\[\033[0;0m\] [\[\033[0;35m\]greaber/autosave\[\033[0;0m\]|\[\033[0;31m\]●1\[\033[0;0m\]\[\033[0;34m\]✚ 10\[\033[0;0m\]\[\033[0;0m\]]\[\033[0;0m\] $

Note that wrapping does work with the default bash prompt in Xfce4-terminal.

I may just switch terminals, but every other terminal program I have tried has some other annoying problem, and this is the only problem with Xfce4-terminal.
Comment 1 Igor editbugs 2016-07-27 10:00:52 CEST
I've tried your PS1 as it's pasted here (removing line breaks), and it's working fine in xfce4-terminal git version as well as in gnome-terminal 3.20.2.
I can guess that this was an issue of vte2 which xce4-terminal 0.6.3 was based on; now we've ported the terminal to vte3 which seems to be free of the issue. Can you build the terminal from git and try it?
Comment 2 Grant Reaber 2016-07-28 22:50:39 CEST
I tried to build xfce4-terminal from the git master branch, but I'm not really familiar with the build process, and I was missing various dependencies.  I tried installing some, but at some point it got to a message that said "checking for vte-2.91 >= 0.38... not found", which suggests it was not even configured to build with vte3 (maybe because I installed wrong versions of some dependencies?).  If you can post instructions for building on Ubuntu 16.04, I will give it another try.
Comment 3 Igor editbugs 2016-07-29 10:19:07 CEST
I had to install Ubuntu 16.04 to VM to come up with the following instruction.
It works for me; though, the Preferences dialog is not showing as it cannot find the UI resources file. If you like the git version and want to use it, I can help with it by providing a 2-line patch which will fix the Preferences.

$ sudo apt-get install build-essential git xfce4-dev-tools libglib2.0-dev libgtk-3-dev libvte-2.91-dev libxfce4ui-2-dev
$ git clone git://git.xfce.org/apps/xfce4-terminal
$ cd xfce4-terminal
$ ./autogen.sh
$ make
$ ./terminal/xfce4-terminal
Comment 4 Grant Reaber 2016-07-29 19:48:02 CEST
Sorry you had to install Ubuntu 16.04.  But thanks!

Actually the instructions you give are what I would have arrived at by keeping on installing missing dependencies probably, but I gave up when I realized it was using libvte-2.91-dev and that there is no libvte-3.0-dev package since you had said that the whole point of me trying the git version was that the behavior might have changed with the switch from vte2 to vte3.

Anyway, following your instructions, the build process works, but I am having the same problem with the terminal I built.

I did investigate a bit more what could be causing my problem, and it seems to be the exotic Unicode characters in my prompt.  It appears that the terminal thinks these characters take up three spaces when they really only take up one space.  Protecting them with \[\] doesn't help because then it thinks they take up no space.

I guess this is probably not a bug in xfce4-terminal, or at least one not peculiar to it, since (contrary to what I originally reported) other terminals seem to have the same problem, when they display the unicode characters properly at all.  Still, if xfce4-terminal could provide some workaround, it might be useful.  I don't know any other way to fix the problem except just not using these fancy Unicode characters in the prompt.
Comment 5 Grant Reaber 2016-07-29 19:57:55 CEST
OK, I investigated further, and it seems the problem is that my locale was not set to UTF8.  Sorry to bother you with something that was not your problem.
Comment 6 Igor editbugs 2016-07-29 20:11:17 CEST
No problem at all!
In fact, I've found a compilation issue when building on Ubuntu with vte version < 0.44 thanks to you :)

So may this bug be closed?
Comment 7 Grant Reaber 2016-07-29 20:24:24 CEST
Yes :)

Bug #12731

Reported by:
Grant Reaber
Reported on: 2016-07-27
Last modified on: 2016-07-29

People

CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information