Bug 144211 - unexpected behaviour with shift+enter in kate/kwrite
Summary: unexpected behaviour with shift+enter in kate/kwrite
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 171779 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-14 17:22 UTC by Shriramana Sharma
Modified: 2008-10-06 10:37 UTC (History)
3 users (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 Shriramana Sharma 2007-04-14 17:22:47 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
OS:                Linux

#include[SHIFT+ENTER] puts a # at the beginning of the next line. 

#)(!@$foogoo[SHIFT+ENTER] puts #)(!@$ at the beginning of the next line. 

Why? This is unexpected behaviour. If this is a feature it should be documented as one with explanation of how it is useful and I did not find any such mention in the shortcuts page in the Kate documentation.

I should note that this happens only if the line starts with a non-alphanumeric and only for the first continuous sequence of non-alphanumerics. i.e. A#[SHIFT+ENTER] 3#[SHIFT+ENTER] produce nothing and #!@)f#%!*[SHIFT+ENTER] repeats only #!@)

Anyhow, it is unwanted behaviour, IMO.
Comment 1 Dominik Haumann 2007-04-14 17:51:33 UTC
Right, it's undocumented and does exactly what you said: copy non-alphanumerics.
It's useful if you write comments:
// text<shift+enter>
// continue comment here
/**
 * <shift+enter>
 * continue text here

We can remove that, of course... You are the first one who complains about it. How many users are out there who find it useful?
Comment 2 Anders Lund 2007-04-14 21:33:48 UTC
/me loves that feature
Comment 3 Shriramana Sharma 2007-04-15 02:01:06 UTC
I have no objection to this feature existing. I realize it can be very useful. I could even start using it myself.

Please then change this to a request for the documentation to mention this feature. Also this thing should be visible in the Configure Shortcuts so that I can change Shift+Enter to something else. Thank you.
Comment 4 Dominik Haumann 2007-04-15 03:20:47 UTC
Agreed. I even think this should be done via scripts, once we can assign shortcuts to jscripts...
Comment 5 Sebastian Pipping 2008-10-05 16:07:43 UTC
*** Bug 171779 has been marked as a duplicate of this bug. ***
Comment 6 Sebastian Pipping 2008-10-05 16:11:27 UTC
if this is intended and wanted, should we close the bug? invalid or wontfix? or
maybe worksforme? :-)
Comment 7 Dominik Haumann 2008-10-06 00:47:53 UTC
action items:
1. use shortcut + normal function in kate-view for this instead of hard-coded in void KateViewInternal::keyPressEvent( QKeyEvent* e )
2. add it to the docbook documentation
Comment 8 Dominik Haumann 2008-10-06 10:36:33 UTC
SVN commit 868385 by dhaumann:

- "insert smart newline" is an action now
- default shortcut: SHIFT+Enter/Return
- cleaner code in do SmartNewline
BUG: 171779


 M  +17 -2     kateview.cpp  
 M  +1 -0      kateview.h  
 M  +20 -28    kateviewinternal.cpp  
 M  +1 -0      kateviewinternal.h  



SVN commit 868387 by dhaumann:

document smart newline (is that the correct place?)

 M  +4 -0      fundamentals.docbook  
Comment 9 Dominik Haumann 2008-10-06 10:37:25 UTC
Now you can disable this feature by removing the shortcuts in the "configure shortcuts" dialog. The action is called "Insert Smart Newline"