leahneukirchen / mblaze

Unix utilities to deal with Maildir
Other
442 stars 48 forks source link

mless N:x seems off-by-one. #261

Open rnkn opened 1 month ago

rnkn commented 1 month ago

Hello,

mless appears to be off-by-one when issuing the N:x command.

To reproduce

$ mlist Maildir/ | mless
2:n
1:x

And then

2:x

Expected results

Navigation back to message 1.

Actual results

First the error

mless scan// (message 1 of 6)

And then

mless 1 (message 2 of 6)

mblaze v 1.2

leahneukirchen commented 1 month ago

Not sure I follow... :x goes to the first file in less, which is the //scan output.

So :x:n will move to the first message. N goes to the first unread message.

rnkn commented 1 month ago

I'm using N as a placeholder for any number, so e.g. with a bunch of files open in less, 10:x goes to the 10th file, whereas with a bunch of messages open in mless 10:x goes to the 9th message. Is this intended?

rnkn commented 1 month ago

Sorry, my first post is very unclear.

leahneukirchen commented 1 month ago

I think that's not avoidable, as the first file is the scan overview...

rnkn commented 1 month ago

What about 0:x for the scan overview?

Edit: I see the 0:x already show the scan overview...