Hi, when i try to copy paste something with mouseclick into a gnome-terminal it displaces the pastet text. Its realy annoying. For example: Original in mozilla: ------------------------------------------------------------------------------- #include <curses.h> #include <signal.h> static void finish(int sig); int main(int argc, char *argv[]) { int num = 0; /* initialize your non-curses data structures here */ (void) signal(SIGINT, finish); /* arrange interrupts to terminate */ (void) initscr(); /* initialize the curses library */ keypad(stdscr, TRUE); /* enable keyboard mapping */ (void) nonl(); /* tell curses not to do NL->CR/NL on output */ (void) cbreak(); /* take input chars one at a time, no wait for \n */ (void) echo(); /* echo input - in color */ if (has_colors()) { start_color(); /* * Simple color assignment, often all we need. Color pair 0 cannot * be redefined. This example uses the same value for the color * pair as for the foreground color, though of course that is not * necessary: */ init_pair(1, COLOR_RED, COLOR_BLACK); init_pair(2, COLOR_GREEN, COLOR_BLACK); init_pair(3, COLOR_YELLOW, COLOR_BLACK); init_pair(4, COLOR_BLUE, COLOR_BLACK); init_pair(5, COLOR_CYAN, COLOR_BLACK); init_pair(6, COLOR_MAGENTA, COLOR_BLACK); init_pair(7, COLOR_WHITE, COLOR_BLACK); } for (;;) { int c = getch(); /* refresh, accept single keystroke of input */ attrset(COLOR_PAIR(num % 8)); num++; /* process the command keystroke */ } finish(0); /* we're done */ } static void finish(int sig) { endwin(); /* do your non-curses wrapup here */ exit(0); } ------------------------------------------------------------------------------- After pasting into gnome-terminal: ------------------------------------------------------------------------------- #include <curses.h> #include <signal.h> static void finish(int sig); int main(int argc, char *argv[]) { int num = 0; /* initialize your non-curses data structures here */ (void) signal(SIGINT, finish); /* arrange interrupts to terminate */ (void) initscr(); /* initialize the curses library */ keypad(stdscr, TRUE); /* enable keyboard mapping */ (void) nonl(); /* tell curses not to do NL->CR/NL on output */ (void) cbreak(); /* take input chars one at a time, no wait for \n */ (void) echo(); /* echo input - in color */ if (has_colors()) { start_color(); /* * Simple color assignment, often all we need. Color pair 0 cannot * be redefined. This example uses the same value for the color * pair as for the foreground color, though of course that is not * necessary: */ init_pair(1, COLOR_RED, COLOR_BLACK); init_pair(2, COLOR_GREEN, COLOR_BLACK); init_pair(3, COLOR_YELLOW, COLOR_BLACK); init_pair(4, COLOR_BLUE, COLOR_BLACK); init_pair(5, COLOR_CYAN, COLOR_BLACK); init_pair(6, COLOR_MAGENTA, COLOR_BLACK); init_pair(7, COLOR_WHITE, COLOR_BLACK); } for (;;) { int c = getch(); /* refresh, accept single keystroke of input */ attrset(COLOR_PAIR(num % 8)); num++; /* process the command keystroke */ } finish(0); /* we're done */ } static void finish(int sig) { endwin(); /* do your non-curses wrapup here */ exit(0); } -------------------------------------------------------------------------------- Reproducible: Always Steps to Reproduce: 1.Copy text where some lines begin with tabs e.g. from mozilla 2.Paste text in gnome-terminal 3. Actual Results: displaced output Expected Results: same output as input I use gnome-terminal 2.6.1 Portage 2.0.50-r9 (default-x86-1.4, gcc-3.3.4, glibc-2.3.4.20040619-r0, 2.6.7-gentoo-r10) ================================================================= System uname: 2.6.7-gentoo-r10 i686 Intel(R) Pentium(R) M processor 1300MHz Gentoo Base System version 1.5.2 distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium3 -mcpu=pentium3 -funroll-loops -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/snort /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium3 -mcpu=pentium3 -funroll-loops -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="http://gentoo.inode.at ftp://gentoo.inode.at/source rsync://rsync.fhh.opensource-mirror.de/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ rsync://linux.rz.ruhr-uni-bochum.de/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo rsync://mirrors.sec.informatik.tu-darmstadt.de/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo rsync://ftp.join.uni-muenster.de/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X X509 aalib acpi alsa arts autofs avi berkdb cdr cgi crypt cups dga encode esd ethereal fbcon ffmpeg foomaticdb gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 imap imlib ipv6 irda irmc java javascript jpeg kde lcd ldap libg++ libwww mad maildir md5sum mikmod mmx motif mozcalendar mozilla mpeg mpeg4 ncurses nls oav oggvorbis opengl oss pam pcmcia pdflib perl png pnp python qt quicktime readline samba sdl slang snmp socks5 spell ssl svga tcltk tcpd tiff transcode transparent-proxy truetype unicode usb vim-with-x wavelan wmf x86 xchattext xml2 xmms xv zlib"
Right, so it keeps adding the tabs, this belongs upstream - we need to post up there when we can, or you can reporter.
in what app do you paste it ?
Mike Gardiner 2004-08-06 04:40 PST wrote: "...we need to post up there when we can, or you can reporter." ??????? I pasted it in vim, which was running in a gnome-terminal
cause nano does it alright, but i'm no big man for the console editors, so i don't know much about that. Could it be vim/g-t specific ?
I can reproduce this in nano, here, so it's definitely not a vim-specific thing.
so what version of gnome-terminal are you guys using ?
and vte version as well (sorry forgot) ?
gnome-terminal-2.6.1 vte-0.11.11
I use vte-0.11.11 and gnome-terminal-2.6.1
Does this only happen in gnome-terminal? If not: Did you turn off auto-indent in your application? in vim type: <ESC> :set paste or <ESC> :set noai in nano (which i don't use) the help page says: M-I toggle auto-indent
this looks like the console editor doing auto-indenting on top of the tabs cut and pasted from the clipboard. i don't think its a gnome-terminal issue. works fine for me in both nano and vi which doesn't have auto-indent turned on.