EmEditor (text editor) Forum Index
   Enhancement Suggestions about Macros
     GetLine Method could return just the current line?
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
Stefan
Posted on: 7/12/2012 7:56 am
Home away from home
Joined: 7/14/2008
From: Germany, EU
Posts: 263
GetLine Method could return just the current line?


My problem:

Often i just want to use an short code:
CurrLine = document.GetLine(just the current line the cursor is in);



but i have to write two lines of code every time:
yPos = document.selection.GetActivePointY(eePosLogical);
CurrLine = document.GetLine( yPos );



Question:

do i miss something?
Is there an better (quicker/shorter) solution
to get the text from the current line?


If not:

can this command be improved?

For example,
IF there is NO parameter between the GetLine() parentheses
THEN just returning the current line where the cursor is in.


Or by an additional GetLine()-parameter like "."
for the yLine-Parameter to indicate the current line.


Ahh: since the commands can get Flags,
i think we can use
"logical coordinates"
"without return codes"
"eePosLogical"
as default flags for that special case?

.
Flat Previous Topic | Next Topic


Subject Poster Date
 » GetLine Method could return just the current line? Stefan 7/12/2012 7:56 am

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