Am 20.02.2012 11:19, schrieb spir:
On 02/20/2012 10:57 AM, Emil Brink wrote:
On Mon, Feb 20, 2012 at 10:14 AM, Frank Lanitzfrank@frank.uvena.de wrote:
Am 20.02.2012 09:49, schrieb Emil Brink:
Should it run only over the selection, if one is present?
Yes. selection given: Only act on selection non selection given: whole document.
Right. That does make sense, but there a few intricacies involved that made me postpone it a bit:
- Deleting lines in the middle of the selection will make it a bit
less well-defined where the selection ends, basically. 2. The selection might both start in the middle of a line, and in the middle of a line, which makes it a bit weird for a strict line-oriented operation like this.
Still, I'll try to implement something that makes sense for selections, too. Thanks.
Require the selection to be of whole lines. Else do nothing and properly inform the user, since it makes no sense (as ypou say).
Right. I was going to suggest doing it like the toggle comment command. Don't consider the exact seleciton but the lines which are selected, even if only partially selected. I.e. expand the selection to the whole line internally.
E.g. (X indicates selection, - is an unselected character) -------- ---XX XXX XX--- -------
Line 2,3 and 4 would be counted.