diff --git a/Documentation/yab-Commands b/Documentation/yab-Commands index cc894e4..8d4eeec 100644 --- a/Documentation/yab-Commands +++ b/Documentation/yab-Commands @@ -659,7 +659,8 @@ LineNumber = TEXTEDIT GET TextEdit$, Option$, Search$ LineNumber = Option$ = "Case-Sensitive-Find", Search$ LineNumber = TEXTEDIT GET TextEdit$, Option$ IsChanged = Option$ = "hasChanged" - LineNumber = Option$ = "countlines" + LineNumber = Option$ = "countlines" -- /n characters + LineNumber = Option$ = "countphysicallines" -- displayed lines LineNumber = Option$ = "currentline" YOffset = Option$ = "vertical-scrollbar" XOffset = Option$ = "horizontal-scrollbar" @@ -673,6 +674,7 @@ TEXTEDIT SET TextEdit$, Option$, Value Option$ = "wordwrap", true/false Option$ = "editable", true/false Option$ = "color-case-sensitive", true/false + Options = "Cursor", ofset Option$ = "changed", true/false Option$ = "gotoline", LineNumber Option$ = "select", LineNumber diff --git a/src/YabInterface.cpp b/src/YabInterface.cpp index 22cfd34..8780575 100644 --- a/src/YabInterface.cpp +++ b/src/YabInterface.cpp @@ -3796,7 +3796,11 @@ void YabInterface::TextSet(const char* title, const char* option, int value) myText->SetCaseSensitive((bool)value); else if(tmp.IFindFirst("tabwidth")!=B_ERROR) myText->SetTabWidth(value); + else if(tmp.IFindFirst("curser")!=B_ERROR) + myText->Select(value, value); else if(tmp.IFindFirst("textwidth")!=B_ERROR) + + { // BRect txtframe = myText->TextRect(); // txtframe.right = txtframe.left + value; @@ -4126,6 +4130,8 @@ int YabInterface::TextGet(const char* title, const char* option) } else if(tmp.IFindFirst("countlines")!=B_ERROR) ret = myText->CountLines(); + else if(tmp.IFindFirst("countphysicallines")!=B_ERROR) + ret=myText->CountPhysicalLines(); else if(tmp.IFindFirst("textlength")!=B_ERROR) ret = myText->TextLength(); else if(tmp.IFindFirst("haschanged")!=B_ERROR) diff --git a/src/libyab.so b/src/libyab.so index 2069934..a576d2b 100755 Binary files a/src/libyab.so and b/src/libyab.so differ diff --git a/yab-IDE/data/Help_En.dat b/yab-IDE/data/Help_En.dat index e3c3959..d9697af 100644 --- a/yab-IDE/data/Help_En.dat +++ b/yab-IDE/data/Help_En.dat @@ -8361,7 +8361,8 @@ This is a hook function that is set once the user changes the text, reset it to Then use this hook to see if the user has changed the text. -Option$ = "countlines" -- returns the number of lines +Option$ = "countlines" -- returns the number of lines ending in /n +Options = "countphysicallines" -- returns the number of displayed lines Option$ = "currentline" -- returns the curent lLineNumber Option$ = "vertical-scrollbar" -- returns the virtical ofset of the scrollbar Option$ = "horizontal-scrollbar" -- returns the horizontal ofset of the scrollbar @@ -8440,6 +8441,7 @@ The textedit will notice when text was changed since the last time the option "c Given three parameters, the following options are valid for the textedit named TextEdit$ when the third parameter Value is a number: Option$ = "autocomplete-start" -- set the number of characters when auto-completion should kick in (default is 4) +Option$ = "Cursor" -- place the curser at the ofset of Value characters from the start. Option$ = "gotoline" -- put the cursor to the line with number Value Option$ = "select" -- select the line with number Value Option$ = "tabwidth" -- set the tab width to Value (in pixel!), default is 28