Bug 363179

Summary: While renaming long-name object, the Home button returns to start of line, not name
Product: [Applications] dolphin Reporter: Laptander <dev-laptander>
Component: view-engine: icons modeAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: bugseforuns, elvis.angelaccio, nate, spencerbrown991
Priority: NOR Keywords: usability
Version: 16.12.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 19.07.80

Description Laptander 2016-05-17 12:52:21 UTC
When name of file or folder is long enough, dolphin devides it to several lines. Actually, file name do not contain "\n" (new line) symbol.
When you are renaming such files, you often want to add something to the beginning of file name. But pressing Home button returns cursor to the beginning of last line, not to the beginning of a whole file name.

Reproducible: Always

Steps to Reproduce:
1. Create a file with long name, which will be devided to several lines by dolphin.
2. Select this file and press f2 or choose rename from context menu.
3. Press Home button.

Actual Results:  
Cursor will be pointing to start of the last line.

Expected Results:  
Cursor should be pointing to start of file neme (on first line).

Dolphin version 16.04.1
Comment 1 Spencer Brown 2016-11-28 17:49:40 UTC
I can reproduce this on:
Platform: Archlinux
Frameworks: 5.28.0-1
Dolphin: 16.08.3
Comment 2 Elvis Angelaccio 2016-11-29 10:29:53 UTC
I think we can confirm this, given that filename is indeed a single string (e.g. when you copy it to clipboard), so it can be unexpected that the cursor moves back to a random point in the middle of the string.
Comment 3 Patrick Silva 2019-02-28 17:29:10 UTC
Still valid for Dolphin 18.12.2.

Operating System: Arch Linux 
KDE Plasma Version: 5.15.2
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1
Comment 4 Chinmoy Ranjan Pradhan 2019-05-12 11:03:44 UTC
Git commit d7555d8e11311c16f6dadc14abd9b3fb9a03a085 by Chinmoy Ranjan Pradhan.
Committed on 12/05/2019 at 11:03.
Pushed by chinmoyr into branch 'master'.

[Inline Rename] Move cursor to correct position on pressing Home and End

Summary:
When pressing home or end key on a wrapped file name the cursor should move to beginning or end of the whole file name
instead of the last line (which is the default behaviour of any textedit widget).

Reviewers: #dolphin, elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21031

M  +17   -0    src/kitemviews/private/kitemlistroleeditor.cpp

https://commits.kde.org/dolphin/d7555d8e11311c16f6dadc14abd9b3fb9a03a085