EmEditor (text editor) Forum Index
   EmEditor Core Bug Reports
     Bug with show marks
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
owilsky
Posted on: 8/26/2010 11:04 pm
Just can't stay away
Joined: 2/12/2008
From:
Posts: 76
Bug with show marks
Hi,

I have a bug in 10.0.1.
Steps to reproduce:

1. customize toolbar to include "Marks"
2. customize marks properties for current configuration:
- check Show Returns
- check Show End of File
- check Show Tabs
- check Show Spaces
- (so check first four checkboxes, leave rest unchecked)
3. Click on marks button on toolbar to enable marks. You see the desired marks. All is fine.
4. Click on marks button on toolbar to disable marks. You still see small dots for spaces. I think these should also disappear.


Yutaka
Posted on: 8/26/2010 11:09 pm
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2424
Re: Bug with show marks
Hi owilsky,

The Marks command toggles only new line, EOF and tab marks, and does not include spaces. This is the specification. On v10, you can use independent commands on the View menu to toggle each mark.


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

owilsky
Posted on: 8/26/2010 11:23 pm
Just can't stay away
Joined: 2/12/2008
From:
Posts: 76
Re: Bug with show marks
Oh.. I see. What a pity... would be nice to have a one click solution to show or hide all desired marks.
zhouzh2
Posted on: 8/29/2010 4:44 am
Just can't stay away
Joined: 7/27/2008
From:
Posts: 90
Re: Bug with show marks
Hi owilsky,
you can use a macro to toggle marks. There is a simple marco somewhere in the forum, I couldn't find it though, I just post it here again.
#title = "Marks"
#tooltip = "Toggle Marks ON/OFF"

// Displays or Hides Marks.

myobject = document.Config;

if (myobject.Mark.ShowReturns==0 && myobject.Mark.ShowEOF==0 && myobject.Mark.ShowTabs==0 && myobject.Mark.ShowSpaces==0 && myobject.Mark.ShowDBSpaces==0 && myobject.Mark.CrLfDifferent==0 && myobject.Mark.ShowIndentGuides==0 && myobject.Mark.ShowControlCharacters==0) {
myobject.Mark.ShowReturns="true"; // Returns
myobject.Mark.ShowEOF="true"; // End of File
myobject.Mark.ShowTabs="true"; // Tabs
myobject.Mark.ShowSpaces="true"; // Spaces
myobject.Mark.ShowDBSpaces="true"; // Wide Spaces
myobject.Mark.CrLfDifferent="true"; // CR and LF with Different Marks
myobject.Mark.ShowIndentGuides="true"; // Indent Guides
myobject.Mark.ShowControlCharacters="true"; // Control Characters
}
else {
myobject.Mark.ShowReturns="false"; // Returns
myobject.Mark.ShowEOF="false"; // End of File
myobject.Mark.ShowTabs="false"; // Tabs
myobject.Mark.ShowSpaces="false"; // Spaces
myobject.Mark.ShowDBSpaces="false"; // Wide Spaces
myobject.Mark.CrLfDifferent="false"; // CR and LF with Different Marks
myobject.Mark.ShowIndentGuides="false"; // Indent Guides
myobject.Mark.ShowControlCharacters="false"; // Control Characters
}

myobject.Save();

You can comment the marks you don't want to make the macro suitable to your needs.
owilsky
Posted on: 8/30/2010 12:28 am
Just can't stay away
Joined: 2/12/2008
From:
Posts: 76
Re: Bug with show marks
Hi tried this which should do what I want.

#title = "Marks" 
#tooltip = "Toggle Marks ON/OFF"  

editor.ExecuteCommandByID(4370); //EEID_VIEW_MARKS (4370)   
if(document.Config.Mark.ShowReturns) document.Config.Mark.ShowSpaces = true; 
else document.Config.Mark.ShowSpaces = false;  

document.Config.Save();


Unfortunately document.Config.Mark.ShowSpaces = true does not do anything for me. What do I do wrong?

Oliver
Yutaka
Posted on: 8/30/2010 12:40 pm
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2424
Re: Bug with show marks
Hello owilsky,

You will need to load the Config object into the memory before you can modify and save it. Please rewrite like this:

#title = "Marks" 
#tooltip = "Toggle Marks ON/OFF"  

editor.ExecuteCommandByID(4370); //EEID_VIEW_MARKS (4370)   
cfg = document.Config;
if(cfg.Mark.ShowReturns) cfg.Mark.ShowSpaces = true; 
else cfg.Mark.ShowSpaces = false;  

cfg.Save();


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

owilsky
Posted on: 8/30/2010 11:03 pm
Just can't stay away
Joined: 2/12/2008
From:
Posts: 76
Re: Bug with show marks
OK, works now. Thanks.
Threaded | Newest First Previous Topic | Next Topic | Top


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