History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-3635
Type: Usability Problem Usability Problem
Status: Open Open
Priority: Normal Normal
Assignee: Eugene Vigdorchik
Reporter: Stephen Friedrich
Votes: 0
Watchers: 0
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

Bad handling of blank lines in "Select word (method)"

Created: 15 Dec 05 11:31   Updated: 08 Jun 06 13:27
Component/s: Editor. Editing Text
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 4,069
Severity: Medium


 Description  « Hide
When I repeatedly hit ctrl-w to select a method, Idea never selects any preceding or trailing blank line.
I.e. I can select
------------------------------
private void flam() {
}
------------------------------
but I cannot select
------------------------------
private void flam() {
}

------------------------------

This is stupid: There is no use case I can think of where this makes sense. There are a lot of cases, where it would be sensible to include the trailing blank line: Duplicate, Cut, Delete, ...
Please take care to implement this sensibly: If there is a trailing blank line, include it into the selection, else if there is a preceding blank line include that into the selection.
That way it would work for the last method in a class, too.



 All   Comments   Work Log   Change History      Sort Order:
Eugene Vigdorchik - 23 Dec 05 14:58
Don't you think it should be paste action that has to insert correct number of blank lines before/after method/any other member?

Stephen Friedrich - 23 Dec 05 18:57
Hm. That would only handle copy/paste.
What about Cut (ctrl-x), Duplicate (ctrl-D) and delete?

Can you (or anybody else) think of a use case for the current behavior, i.e. in which situation would it make more sense to not select the blank line?


Eugene Vigdorchik - 23 Dec 05 19:01
Of course: save as live template for example.

Stephen Friedrich - 23 Dec 05 19:08
I didn't even know that there is such a function.
Even a power user will use cut/duplicate/delete much more than "save as live template".

But an alternative would be to update the number of surrounding blank lines (according to the code style settings) after each invocation of ctrl-x, duplicate and delete.
So when I duplicate a method, then insert a single blank line between the method and its duplicate (if code style "blank lines around methods is '1'). When I delete the method remove the blank line that is now "too many".
Hm, maybe that's an even better solution.