Bug 171779 - Shift+Enter shortcut duplicates lines
Summary: Shift+Enter shortcut duplicates lines
Status: RESOLVED DUPLICATE of bug 144211
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-28 09:44 UTC by Dendy
Modified: 2008-10-06 00:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dendy 2008-09-28 09:44:36 UTC
Version:           4.1.2 (KDE 4.1.1 (KDE 4.1 >= 20080828)) "release 52.2" (using 4.1.2 (KDE 4.1.1 (KDE 4.1 >= 20080828)) "release 52.2", KDE:KDE4:Factory:Desktop / openSUSE_11.0)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.25.16-0.1-default

KWrite has number of shortcuts, but this one not listed there: Shift+Enter. On random lines it works line ordinary Enter - creates new line and shifts to it. But on lines beginning with figure bracket it duplicates it.

For example:

{<cursor_is_here>

Hitting Shift+Enter produces:

{
{<cursor_is_here>

Expected result:

{
<cursor_is_here>

This bug present a long time in KWrite and irrigates a lot.
Comment 1 Sebastian Pipping 2008-10-05 16:07:43 UTC
All I can say is that it's intended behavior. Paste this text

/**
 * foo

and press Shift+Enter in the last line. That's what it's intended for, I cannot decide if it hurts more than it heals or vice versa, but it's there on purpose.

This thing cries for going into a FAQ.  Do we have a FAQ? :-)

*** This bug has been marked as a duplicate of bug 144211 ***
Comment 2 Dominik Haumann 2008-10-06 00:44:50 UTC
it's indeed a feature: it inserts all leading non-letters of the current line, useful for comments like
 /**
  * now press enter
and
 // c++ comment, continue with shift+enter

The bug here is that it's
1. not documented
2. a hard coded shortcut