Wish to be able to copy the entire line with one mouse click
Wish to be able to copy the entire line with one mouse click
Most IDEs I used to work with offer the ability to copy the entire line by placing the cursor at the left gutter, clicking there would highlight the entire line. May be I am missing something but I really miss this ability.
The best there is the Options, Editor Options, Tiggers, Mouse double click macro setting.May be I am missing something but I really miss this ability.
Basically if you put a macro into that edit field it gets called on a left button double click.
But it will only get called for a double click inside the edit region.
The macro below copies and highlights the current line if you double click the mouse past the end on the current line.
Code: Select all
function key_macro()
-- check if the click is on the line
if (is_cursor_online() == 1) then
-- set the return code to zero indicating we want the default handler to fire
set_return_code(0);
else
-- copy the line to clipboard
LineCopy()
-- highlight the line
MarkLineSet()
MarkLineReset()
-- debugging
message("Current line line copied to clipboard.")
-- set the return code to one indicating we don't want the default handler to fire
set_return_code(1);
end
end
key_macro()
Unfortunately because of a small bug the set_return_code call should work but doesn't, meaning the default processing is still called no matter what return code is provided

This results in an error message being displayed on the status bar and a error beep

But this bug will be fixed in the next release

Cheers Jussi
Code: Select all
Most IDEs I used to work with offer the ability to copy the entire line by placing the cursor at the left gutter
So I had a look at the code and sure enough there is code in Zeus that does this

The only problem is this user had asked for a different mouse marking gesture.
In that case the user had suggestion Zeus should mark lines of code whenever you press down and hold the left mouse while moving the mouse over the folding region.
The advantage of this gesture is that it allows you to select more than one line of code, by jiust holding down the left button and moving the mouse over more and more lines of the folding region

Cheers Jussi