Re: [dev] [dmenu] Readline Bindings
Connor Lane Smith a écrit : > On 14/11/2011, Bastien Dejean wrote: > > This is only true when the search string is empty which is extremely > > rare: most of the times the first thing the user do is to type a few > > characters to filter the results and hence, the cursor is then at the > > end of the search string, C-f will move down in the search results and > > C-b backward in the search string. > > ... No. So long as you are not on the first item in the list, C-b will > move back through the selected items, regardless of the length of the > input. And so long as the cursor is at the end of the input, C-f will > move forward through the selected items. The cursor basically > continues from where the selector ends. Now I understand what you're trying to do. Since C-b doesn't behave like that in my experience, I wondered what particular option I might be using that you're not: and I though about the number of lines. So... we have a bug: just try with 'dmenu -l 2' or any number > 1. Greetings, -- Bastien
Re: [dev] [dmenu] Readline Bindings
On 14/11/2011, Bastien Dejean wrote: > This is only true when the search string is empty which is extremely > rare: most of the times the first thing the user do is to type a few > characters to filter the results and hence, the cursor is then at the > end of the search string, C-f will move down in the search results and > C-b backward in the search string. ... No. So long as you are not on the first item in the list, C-b will move back through the selected items, regardless of the length of the input. And so long as the cursor is at the end of the input, C-f will move forward through the selected items. The cursor basically continues from where the selector ends. cls
Re: [dev] [dmenu] Readline Bindings
Connor Lane Smith a écrit : > On 14/11/2011, Bastien Dejean wrote: > > Well, suppose you're using C-f to move down in the list of matches, then > > you want to move up, you hit C-b because it's the natural symmetric of > > C-f and you end up moving the cursor backward in the search string. > > No, if you're part-way through the results and you hit C-b you just > move back through the results. Only if you cannot go back do you begin > to move the cursor; dmenu is a menu first, an input field second. (And > C-n / C-p don't move the cursor at all.) This is only true when the search string is empty which is extremely rare: most of the times the first thing the user do is to type a few characters to filter the results and hence, the cursor is then at the end of the search string, C-f will move down in the search results and C-b backward in the search string. Cheers, -- Bastien
Re: [dev] [dmenu] Readline Bindings
On 14/11/2011, Bastien Dejean wrote: > I happen to use dmenu to move image files around from within sxiv and, > in this context, I found the default C-w behavior to be inappropriate. I'll have a think about whether there's a compromise. > Well, suppose you're using C-f to move down in the list of matches, then > you want to move up, you hit C-b because it's the natural symmetric of > C-f and you end up moving the cursor backward in the search string. No, if you're part-way through the results and you hit C-b you just move back through the results. Only if you cannot go back do you begin to move the cursor; dmenu is a menu first, an input field second. (And C-n / C-p don't move the cursor at all.) cls
Re: [dev] [dmenu] Readline Bindings
Connor Lane Smith a écrit : > On 14/11/2011, Bastien Dejean wrote: > > C-w is not extremely useful as it considers that anything except > > 'space' is a word character. > > I actually find this more useful. A lot of implementations zip through > all your non-alnum symbols when you hit C-w, which I just find > irritating. I happen to use dmenu to move image files around from within sxiv and, in this context, I found the default C-w behavior to be inappropriate. > > I find the behavior of C-f and C-b to be counter intuitive in the > > 'fallthrough' cases. > > Why do you find it counterintuitive? I find it very intuitive. :p Well, suppose you're using C-f to move down in the list of matches, then you want to move up, you hit C-b because it's the natural symmetric of C-f and you end up moving the cursor backward in the search string. Greetings, -- Bastien
Re: [dev] [dmenu] Readline Bindings
Hey, We aren't intending to have 'readline' bindings, readline just happens to have a few useful bindings we can steal. On 14/11/2011, Bastien Dejean wrote: > C-w is not extremely useful as it considers that anything except > 'space' is a word character. I actually find this more useful. A lot of implementations zip through all your non-alnum symbols when you hit C-w, which I just find irritating. > I find the behavior of C-f and C-b to be counter intuitive in the > 'fallthrough' cases. Why do you find it counterintuitive? I find it very intuitive. :p > Besides, 'C-p' and 'C-n' are inverted: Oops! This one is a bug. That's a bad. Fixed in tip. > Has a vim style path completion (C-x C-f) been considered? It's been considered, and rejected. dmenu isn't intended to be a shell replacement. Thanks, cls