Trivial Leafpad bug

Please post any bugs you have found
Post Reply
Message
Author
PaulR
Posts: 249
Joined: Wed 04 May 2005, 18:45
Location: UK

Trivial Leafpad bug

#1 Post by PaulR »

'Close' button in 'About' dialog doesn't work

(I told ya it was trivial!)

Puppy 1.04

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#2 Post by pakt »

I've noticed another trivial but annoying bug in Leafpad. When editing a text file with the cursor at the start of a line: if I move the cursor up or down through the text and land on a empty line, the cursor jumps to the right side of the text window, ie, to the end of the empty line :?

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#3 Post by BarryK »

pakt wrote:I've noticed another trivial but annoying bug in Leafpad. When editing a text file with the cursor at the start of a line: if I move the cursor up or down through the text and land on a empty line, the cursor jumps to the right side of the text window, ie, to the end of the empty line :?
er, that's a old fixed bug.

You must have XKBD support disabled when you start X. That causes the bug.
The bug should go away when I upgrade GTK, probably for 1.0.6.

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#4 Post by pakt »

BarryK wrote:
pakt wrote:I've noticed another trivial but annoying bug in Leafpad. When editing a text file with the cursor at the start of a line: if I move the cursor up or down through the text and land on a empty line, the cursor jumps to the right side of the text window, ie, to the end of the empty line :?
er, that's a old fixed bug.

You must have XKBD support disabled when you start X. That causes the bug.
The bug should go away when I upgrade GTK, probably for 1.0.6.
Thanks for the info Barry, but when I searched the forum for 'the fix', I only found
BarryK wrote:Okay, it looks like for pup 1.0.5 I'll have to disable xkbd in /usr/X11R6/bin/xwin, using that "-kb" option.
And, apply the patch to the gtk source.
Is this how XKBD support is disabled?

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#5 Post by BarryK »

Are you using a non-standard 1.0.5?
The X server has xkbd enabled, which should be fine.
If you are using a X server without xkbd support then there is a problem.
Or, if you disabled xkbd support at start of X then there is a problem -- you found something about -kb which is to do with that. The default xwin script should work.

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#6 Post by pakt »

Took me a while to sort this out (been busy with other projects ;) ).

Got this rtl-bug when I run puppy104 rather unconventionally - indirectly through a VNC-client in Kanotix on my (infamous puppy-unfriendly) Dell laptop, and puppy running TightVNC server on an old clunker (only way to get puppy in high resolution on my laptop without using bladehunter's XFree-puppy104).

Now this may surprise you: I don't get the rtl-bug when use the old PC (the one I use as VNC-server, running puppy104) and run Leafpad. No problems. But the bug shows up when I use the VNC-client and run Leafpad... :!:

Update: Just finished downloading puppy105rc - Running it with JWM in the VNC-client gave the same symptoms as above...

User avatar
miriam
Posts: 373
Joined: Wed 06 Dec 2006, 23:46
Location: Queensland, Australia
Contact:

A bug in leafpad loading pathnames with ':', and a fix

#7 Post by miriam »

If I have a directory name that contains ':' somewhere in the pathname then leafpad won't load the file.

I have a lot of audiobooks, mostly from Librivox. I like to collect multiple part audio files under a single directory and name the directory as the book name and the duration of all the audio files added together, for instance, I downloaded H G Wells' "The Time Machine" from Librivox ages ago (there are now 4 different readings of it on the site!!). The version I downloaded comprises 13 audio files so I put them in a folder which I named "Time Machine (reading - 13 parts) [3:20:19]" where the "3:20:19" is the cumulative duration of all the parts. (If anybody is interested in an easy way to calculate that I can post a simple script I wrote.)

So now if I have a text file in the same directory that contains information about the audio files (the download address, the name of the person reading it, and so on) and try to view or edit it in leafpad then it won't load. Leafpad simply opens empty as if I hadn't asked for a file. If I try to load it into geany it loads fine.

The way I use leafpad is from a RoxApp, so I put this code in the AppRun file inside the RoxApp:

Code: Select all

#!/bin/sh

# A bug in leafpad doesn't allow ":" in pathnames

# workaround by changing dir to where file is
cd "${@%/*}"

# then load the file from current dir
exec leafpad "${@##*/}"

The two weird filenames simply use bash's inbuilt string editing functions to snip off the filename (the final '/' and everything following it) leaving just the path for changing directory, and snipping off the path (everything up to and including the final '/') leaving just the filename to load the file from the current directory.

NOTE: this doesn't help if the filename itself contains the ':' character. In that case leafpad still won't load it.

Hope this helps someone else.
[color=blue]A life! Cool! Where can I download one of those from?[/color]

User avatar
miriam
Posts: 373
Joined: Wed 06 Dec 2006, 23:46
Location: Queensland, Australia
Contact:

full fix

#8 Post by miriam »

I couldn't leave this alone.

The version of leafpad that I was using is Leafpad 0.8.17, which is the one that came with Slacko Puppy 6.3.2. However I just tried loading files with ':' in the pathname into a more recent version -- Leafpad 0.8.18.1, and it works fine.

So, compile version Leafpad 0.8.18.1 or later and you won't have to worry about this bug or using my workaround.
[color=blue]A life! Cool! Where can I download one of those from?[/color]

phat7
Posts: 179
Joined: Fri 05 Jun 2015, 08:54

Re: A bug in leafpad loading pathnames with ':', and a fix

#9 Post by phat7 »

miriam wrote:If I have a directory name that contains ':' somewhere in the pathname then leafpad won't load the file.
Knownbug. Was supposed to be fixed in 0.8.17-3. Where did you find 0.8.18.1?

User avatar
miriam
Posts: 373
Joined: Wed 06 Dec 2006, 23:46
Location: Queensland, Australia
Contact:

#10 Post by miriam »

Thanks phat7. I searched for it but was unable to find it as a bug description.

The latest version of leafpad is at:
http://download.savannah.gnu.org/releases/leafpad/

leafpad-0.8.18.1.tar.gz is right near the bottom of the listing on that page.
[color=blue]A life! Cool! Where can I download one of those from?[/color]

learnhow2code

#11 Post by learnhow2code »

fig os already has leafpad 0.8.18.1 -- even in puppy mode.

however you can add it to puppy with this line:

Code: Select all

wget http://http.us.debian.org/debian/pool/main/l/leafpad/leafpad_0.8.18.1-4_i386.deb ; dpkg-deb -x leafpad_0.8.18.1-4_i386.deb /
this assumes the other link requires compiling.

User avatar
miriam
Posts: 373
Joined: Wed 06 Dec 2006, 23:46
Location: Queensland, Australia
Contact:

#12 Post by miriam »

Thanks learnhow2code.
Yes, the link I gave is to the source code, so needs to be compiled.
[color=blue]A life! Cool! Where can I download one of those from?[/color]

Post Reply