little-brother / sqlite-gui

Lightweight SQLite editor for Windows
GNU General Public License v2.0
1.07k stars 51 forks source link

Editor - find next text occurrence #109

Closed jungle-boogie closed 2 years ago

jungle-boogie commented 2 years ago

Hi,

Take this query:

select b.price,
       b.author,
       b.title,
       sum(ob.quantity) cnt 
  from order_books ob 
  inner join books b on ob.book_id = b.id 
 group by book_id 
 order by  3 desc 
 limit 5;

Highlight select and notice it will skip down and highlight author.

In fact, author will be highlighted multiple times for various 'find next occurrence`.

I think it may be because there are no multiple occurrence of phrases, so it defaults to author.

Thanks!

little-brother commented 2 years ago

Could you provide a screenshot?

jungle-boogie commented 2 years ago

hmmm, now I don't see the same behavior, but the F3 button for find next occurrence also doesn't work.

select b.price,
       b.author,
       b.title,
       sum(ob.quantity) cnt 
  from order_books ob 
  inner join books b on ob.book_id = b.id 
 group by book_id, b.author
 order by  3 desc 
 limit 5;

Notice there are two b.author.

  1. Highlight the first
  2. Press F3
  3. Notice nothing happens
little-brother commented 2 years ago

Occurance highlghting works only for a-Z0-9-range to prevent processing for common selection. b.author contains . and therefore occurances aren't highlighted.

little-brother commented 2 years ago

The error doesn't reproduced.