EmEditor (text editor) Forum Index
   Questions and Answers about Macros
     How control duplicate keyword in Highlight List ?
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
hihihlo
Posted on: 6/9/2011 8:08 am
Just popping in
Joined: 6/9/2011
From:
Posts: 11
How control duplicate keyword in Highlight List ?
Hi,

I want Highlight word at cursor(caret) by press F6,
and Unhighlight word at caret by press F6 too.
(use F6 to toggle Highlight in xx.jsee documents)

below snippet macro can add keyword "return" to Highlight List :
var cfg = document.Config;
cfg.Highlight.List.Add("return", 1, 1, 0, 0, 0, 0, 0);
cfg.Save();
but it have no effect because keyword "return" in list already !!

My test result is that Highlight only effect at prior keyword rather posterior keyword
if the keyword duplicate.
So can you add below two feature ?
1. add a method like Highlight.List.AddAtBegin(),
for insure the new add keyword will overwite Highlight effect.
2. add a UserData(int) Propertie to HighlightItem Object for
macro or plugin use (can't set value by Highlight dialog),
then macro/plugin can easy know whether Remove that keyword.
UserData of xx.jsee' default keyword "return" is 0 ==> NOT Remove it
UserData of macro F6 added keyword "return" is 1 ==> can Remove it

Thanks !
Flat Previous Topic | Next Topic


Subject Poster Date
 » How control duplicate keyword in Highlight List ? hihihlo 6/9/2011 8:08 am
     Re: How control duplicate keyword in Highlight List ? Yutaka 6/9/2011 8:45 am
       Re: How control duplicate keyword in Highlight List ? hihihlo 6/9/2011 8:39 pm
         Re: How control duplicate keyword in Highlight List ? Yutaka 6/10/2011 8:45 am

Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文