Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#72 fix for some istrings corner cases

closed
nobody
None
5
2008-10-23
2007-01-19
No

The istrings command has two problems. First, it does not ignore case when matching the delimiter buffer. Second, it lowerizes the current buffer in place when looking it up in the keyword hash table. The current buffer might be used later with a strings command via a hold or save_s.

Here is a test case:

delicious.jsf:
=Default
=Red red
=Green green
=Blue blue

:initial Default
* first_word noeat buffer

:first_word Red
* idle noeat save_s istrings
"delicious" delicious
done
"A-Za-z" first_word

:idle Default
* idle
"A-Za-z" word noeat buffer

:word Green
* idle noeat istrings
"&" match
"delicious" delicious
done
"A-Za-z" word

:match Red
* idle noeat

:delicious Blue
* idle noeat

apples.txt:
Apples are delicious. Apples to apples.

Highlight apples.txt with "delicious". Only the second "apples" is red in the second sentence. The highlighter only matches one because it is not ignoring case when comparing the current buffer to the delimiter buffer. It matches the second because the first "Apples" was lowerized before being saved into the delimiter buffer.

Charles J. Tabony

Discussion

  • patch for syntax.c

     
    Attachments
  • Joe Allen
    Joe Allen
    2008-10-23

    • status: open --> closed