Hi, I am having a problem with less. Steps to reproduce: 1. Download packs 2. less packs 3. search for a string in the end of the file, for example nagios. 4. scroll down until you see nagios is inverted on the screen 5. search again for nagios, now less finds the strin nagios Any comments? Can anybody reproduce this? I know, it is insane to have a file with 26000 characters in a line, but less should handle this properly, I think. sys-apps/less-382-r2 I hope, not wasting QA time, Johnny Reproducible: Always Steps to Reproduce: Portage 2.0.51-r2 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6. 8-gentoo-r4 i686) ================================================================= System uname: 2.6.8-gentoo-r4 i686 AMD Opteron(tm) Processor 242 Gentoo Base System version 1.4.16 distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [disabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.14.90.0.8-r1 Headers: sys-kernel/linux26-headers-2.6.8.1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-m32 -O3 -march=athlon-4 -mcpu=athlon-4 -fomit-frame-pointer -funroll- loops -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /lib/modules /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3. 3/shutdown /usr/kde/3/share/config /usr/lib/fax /usr/lib/mozilla/defaults/pref / usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/ share/texmf/xdvi/ /var/bind /var/qmail/control /var/spool/fax/etc" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-m32 -O3 -march=athlon-4 -mcpu=athlon-4 -fomit-frame-pointer -funroll- loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs buildpkg distlocks sandbox sfperms" GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp. uni-muenster.de/pub/linux/distributions/gentoo http://ftp-stud.fht-esslingen.de/ pub/Mirrors/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowex 3dnowext X X509 Xaw3d aac aalib accessibility accounting acl acpi activefilter adns afs aim alsa apache2 apm arts asterisk async atm audiofile authdaemond avi bcmath berkdb bidi bitmap-fonts blender-game bluetooth bmp bonobo bootsplash bzlib c++ calendar camaelon caps cddb cdparanoia cdr cgi chasen chroot clearpasswd codecs cpdflib crypt cscope ctype cups curl curlwrappers cyrus dbase dbm dbx dedicated devfs26 devmap dga dhcp dio directfb divx4linux djbfft drac dts dvd dvdr dvdread edl eds emacs encode esd ethereal evo exif f77 faad fam fastcgi fax fbcon fbdev fftw filepro flac flash flatfile flexresp flood fltk fluidsynth foomaticdb frascend freetds freetype frlargefiles frxp ftp gb gcj gd gd-external gdbm ggi gif gimpprint gmp gnokii gnome gnutls gphoto2 gpm gps graphviz gsm gsnd gstreamer gtk gtk2 gtkhtml guile hal howl iconv icq icu idea imagemagic imagemagick imap imlib imlib2 immqt immqt-bc inetd inifile innodb insecure-drivers intl ipalias ipv6 irda jabber jack jack-tmpfs java javascript jbig jce jikes jit jks jms joystick jpeg jpeg2k junit jython kde kerberos koffice-plugin krb4 ladcca latex lcd lcms ldap leim lesstif libcaca libg++ libgda libsamplerate libwww live lynxkeymap lzo lzw-tiff mad maildir maildrop mailwrapper matroska mbox mbrola mcal mcve md5sum mecab memlimit mhash mikmod mime ming mmap mmx mmx2 motif mozcalendar mozilla mozsvg mpeg mpeg4 mpi mppe-mppc msn multilib multitarget mysql mysql41 mythtv nagios-dns nagios-ntp nagios-ping nagios-ssh nas ncurses netcdf nethack network neural nis nls nntp nptl nptlonly oav objc odbc offensive oggvorbis opengl oscar oss pam pcap pcmcia pcntl pcre pcsc-lite pda pdflib perl pg-hier pg-intdatetime pg-vacuumdelay php pic plotutils png pnp portaudio posix postgres povray ppds prelude procmail pvm python qt quicktime radius readline real rhino rrdtool rtc ruby samba sasl scanner sdl serial session sftplogging shaper shared sharedmem silc simplexml skey slang slp smartcard smime sndfile snmp snortsam soap sockets socks5 softquota soundtouch sox spamassassin speex spell spl sqlite sse ssl stats stencil-buffer subject-rewrite svg svga sysvipc szip tcltk tcpd tetex tga theora threads tidy tiff timidity tokenizer transcode transparent-proxy truetype unicode usb userlocales v4l v4l2 vda vhosts vim-with-x virus-scan vpopmail wddx wifi wmf wxwindows x86 xanim xfs xim xine xinerama xml xml2 xmlrpc xmms xosd xpm xprint xscreensaver xsl xv xvid xvmc yahoo yaz zlib"
Created attachment 43423 [details] packs file
are you sure it's just not because less hasnt finished loading the file into memory ? less only searches what has been loaded thus far into the memory buffer ... try running less on the file, then wait until you're sure the whole thing is loaded (hold 'end' until the end of the file shows up), then hit 'home' and try searching
I scrolled down the whole document. Scrolles up, searched for windowmaker. Result: Pattern not found. Scrolled down, windowmaker has been inverted. As I said, there is no newline in this document, only at the very end. Johnny
This is known as "enhancement request 253" on the upstream <http://www.greenwoodsoftware.com/less/bugs.html> web page. The search works; it's only that it displays the first screen-row of the folded file-line which contain the match(es). To convince yourself of this, insert 100 short file-lines containing just "asdf" before the single long file-line in file "packs", insert the same after this long file-line, and repeat your search, either forward or backward. It will find the matching file-line. We may want to fix this by having less move in turn (each time 'n' is pressed) to each match that _begins_ on a new screen-row. I have worked on some of the less source code and may take a look at this, but no promises. Fixing this may be more involved than it appears, depending on how things are done internally.
ah, thanks for the info :)