Bug 220308 - Selection deleted after window regains focus
Summary: Selection deleted after window regains focus
Status: RESOLVED DUPLICATE of bug 248558
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 238265 248467 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-27 20:25 UTC by Haro de Grauw
Modified: 2010-08-20 23:22 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
kpackagekit (82.11 KB, image/png)
2010-06-14 13:35 UTC, Manish Runwal
Details
Portion of Kde desktop (635.87 KB, video/ogg)
2010-06-15 06:53 UTC, Manish Runwal
Details
System Settings (155.32 KB, application/zip)
2010-06-15 08:07 UTC, Manish Runwal
Details
Command line execution log (72.43 KB, text/plain)
2010-06-18 12:30 UTC, Manish Runwal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Haro de Grauw 2009-12-27 20:25:18 UTC
Version:           kate 3.3.1  /  kwrite 4.3.1 (using KDE 4.3.1)
Compiler:          installed from openSUSE 11.2 rpm 
OS:                Linux
Installed from:    openSUSE RPMs

Open Kate (or KWrite), write some text, then select some of it. Now open any other application so that the Kate window loses focus, then click in the Kate window so that it gets the focus back. The selection is deleted.

Especially annoying when copying into other applications: I select a piece of text, copy to clipboard (by any means), paste in the other application... and when I return to Kate the selection is deleted, unless I un-selected it first.

Kate is my favourite text editor by miles, but this little problem is making holes in my code... :)
Comment 1 Dominik Haumann 2009-12-27 20:37:09 UTC
Never heard something like that and cannot reproduce.
Sounds like broken packages, but I'm not sure. Anyone else?
Comment 2 Haro de Grauw 2009-12-27 20:52:17 UTC
Have the same problem on two machines, one i586 and one x86_64, with both Kate and KWrite; packages are:

kate-4.3.1.-3.7.x86-64
kate-4.3.1.-3.7.i586
kwrite-4.3.1-5.6.3.x86_64
kwrite-4.3.1-5.6.3.i586

all downloaded from the official openSUSE servers (these are the latest versions available there).

Would have to be four different broken packages... if you think it's a compiling problem on openSUSE's end, I can file a bug report with them, but I don't think that's likely. Being a happy YaST user I never taught myself to compile my own stuff, so wouldn't know how to compile from source code - but might give it a try all the same if nothing else comes up.

Anybody else having the same problem?
Comment 3 Dominik Haumann 2009-12-27 21:56:59 UTC
Can you try KDE 4.3.3 or 4.3.4? There should be openSUSE packages as well.
Comment 4 Dominik Haumann 2010-05-23 09:59:39 UTC
*** Bug 238265 has been marked as a duplicate of this bug. ***
Comment 5 Dominik Haumann 2010-05-23 16:36:17 UTC
@Haro: Can you upgrade to KDE 4.4 and then compile Kate yourself from gitorious:
http://gitorious.org/kate/pages/Building%20Kate

Do you still have the problem here?
Comment 6 Manish Runwal 2010-05-26 12:25:06 UTC
I got this error while compiling. Please assist me.


CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
CMake Error at /usr/share/cmake/Modules/FindKDE4.cmake:84 (MESSAGE):
  ERROR: cmake/modules/FindKDE4Internal.cmake not found in
  /home/Manish/.kde/share/apps;/usr/share/kde-settings/kde-profile/default/share/apps;/usr/share/kde4/apps
Call Stack (most recent call first):
  CMakeLists.txt:5 (find_package)


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.6)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
Comment 7 Dominik Haumann 2010-05-26 23:46:59 UTC
SVN commit 1130965 by dhaumann:

fix crash in sort method of document sort list proxy model for KDE >= 4.4

BUG: 220308
BUG: 203774


 M  +1 -1      kateviewdocumentproxymodel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1130965
Comment 8 Dominik Haumann 2010-05-26 23:52:14 UTC
fixed for KDE 4.4.4 and in gitorious/trunk. You can test this if you update your gitorious clone with git pull and then recompile.

*** This bug has been marked as a duplicate of bug 203774 ***
Comment 9 Christoph Cullmann 2010-05-29 16:47:03 UTC
SVN commit 1132057 by cullmann:

dhaumann:
    fix crash in sort method of document sort list proxy model for KDE >= 4.4
    
BUG: 220308
BUG: 203774


 M  +1 -1      kateviewdocumentproxymodel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1132057
Comment 10 Manish Runwal 2010-06-13 15:09:54 UTC
Desperately looking for this fix. when will it available?
Comment 11 Dominik Haumann 2010-06-14 01:03:36 UTC
Uhm, did I close the right bug here? As said, I still cannot reproduce the deleted selection after focus regain.
Comment 12 Manish Runwal 2010-06-14 05:28:19 UTC
as per comment #8 its fixed in kde4.4.4 but in update I don't see any 4.4.4 ?
my current machine is kde4.4.3 and kate version is 3.4.3 so till the today's update I haven't seen this is being fixed. so I am looking release of kde4.4.4 so that I can able to update it.
Comment 13 Dominik Haumann 2010-06-14 08:43:39 UTC
As said, was commenting on wrong bug probably... But still, noone of us can reproduce. We won't be able to do anything about it... Sorry.
Comment 14 Manish Runwal 2010-06-14 09:03:06 UTC
Reporting is concern I am 100% sure that I am commenting on correct bug report. As far duplication of behaviour : I have two fedora 12 machines. and on both machine I can see the same behaviour. Will you please guide me what are the debugging things you want from my end so that it will helpful to resolve this issue? You know I am really fan of Kate editor. even I love kate much more than any Hollywood celebrity :) . so by this bug I can't able to do much work on kate. Myself I also web programmer. so lets say If I select perticular text and changes to different opened page on and when I came back to previously selected text page then suddently selected text disappear. so on that time I have to again do cntrl+z (undo) to get back that text. Please help me.
Comment 15 Tomas Trnka 2010-06-14 09:33:02 UTC
I've tried to reproduce on KDE 4.3.5 (Mandriva 2010.0) and 4.4.4 (F13) without any success. I don't remember anything like this happening in the previous versions, either. Maybe some weird configuration issue on your end...
Can you please provide exact, detailed steps to reproduce? (the text in question, details like where do you click to regain focus etc.)
Or possibly locale-related? Are you using any special input methods, RTL or stuff?
Comment 16 Manish Runwal 2010-06-14 13:35:41 UTC
Created attachment 47992 [details]
kpackagekit

This is kpackagekit configuration but I still didn't get kde4.4.4 for updation. do you know why ?
Comment 17 Manish Runwal 2010-06-14 13:37:37 UTC
Hello Tomas, Dominik,
Thanks for showing interest. let me tell you something so it will be easier. all you guys having kde 4.4.4 but I don't have kde4.4.4 I have only kde4.4.3 
Q: How I checked which version of kde I have it ?
A: Open kate -> help -> About kde ... its saying "platform version 4.4.3)
Q :what is kate version ? 
A : Open kate ->help -> About kde ... its saying 3.4.3
i am sure now you might be surprised that if my machine is fully updated still why I didn't get 4.4.4 ? so here is following details on kpackagekit selection
A: see attached image file.

Q: How to go to problem
A: 
a) Open kate with two document. 
b) it doesn't matter whether that file is saved or not. 
c) Let say we given name of two file "page1.txt" and "page2.txt" now write down something on page1.txt file. let say "hello world" 
d) now imagin that you want to copy/paste that 'hello' word to page2.txt. so you use arrow Alt + Right/Left arrow.
e) now you are on page2.txt where you have pasted word "hello"
f) so when you left page1.txt then you might have selected word as "hello" so now when u refocus on page1.txt then I am expecting word "hello" as still selected. 
g)but when I come to page1.txt "hello" word is vanished.
Comment 18 Tomas Trnka 2010-06-14 15:06:10 UTC
1) KDE 4.4.4 for Fedora 12 is in updates-testing (i.e. that "Fedora 12 - Test Updates" repository. The easiest way to update KDE without pulling in lots of unrelated bleeding edge packages is to run yum:

yum --enablerepo="updates-testing" upgrade "kde*"

2) I've followed your directions and got two files, file1 contains "hello world" (with "hello" selected), file2 contains "hello" (unselected). I can switch them happily (using both mouse and keyboard shortcuts) without anything wrong happening.

But what seems to be a possible source of misunderstanding:
"I am expecting word "hello" as still selected" vs. ""hello" word is vanished"

Do you mean the word disappears completely (i.e. is deleted), or is it just the selection that's forgotten (i.e. the word "hello" is still there, but unselected)?
Comment 19 Manish Runwal 2010-06-14 15:25:43 UTC
First I will upgrade that kde 4.4.4. once I upgraded and problem is resolved then no issue. if not resolved then I will create one small video so that it will even better to understand.
Comment 20 Manish Runwal 2010-06-14 15:30:06 UTC
I am getting following message what will be reason for it ?

# yum --enablerepo="update-testing" upgrade "kde*"
Loaded plugins: fastestmirror, presto, protectbase, refresh-packagekit


Error getting repository data for update-testing, repository not found
Comment 21 Tomas Trnka 2010-06-14 15:35:49 UTC
It's called "updates-testing", i.e. you're missing the "S" in "updates"
Comment 22 Manish Runwal 2010-06-14 15:37:08 UTC
Opps sorry. :)
Comment 23 Manish Runwal 2010-06-14 15:38:04 UTC
[root@runwalsoft ~]# yum --enablerepo="updates-testing" upgrade "kde*"
Loaded plugins: fastestmirror, presto, protectbase, refresh-packagekit
Loading mirror speeds from cached hostfile
 * fedora: fedora.iitm.ac.in
 * rpmfusion-free: mirror.cse.iitk.ac.in
 * rpmfusion-free-updates: mirror.cse.iitk.ac.in
 * rpmfusion-nonfree: mirror.cse.iitk.ac.in
 * rpmfusion-nonfree-updates: mirror.cse.iitk.ac.in
 * updates: fedora.iitm.ac.in
 * updates-testing: fedoramirror.hnsdc.com
1082 packages excluded due to repository protections
Setting up Upgrade Process
No Packages marked for Update
Comment 24 Manish Runwal 2010-06-14 15:50:45 UTC
Even I tried to "yum clean all" still it says "No Packages marked for update" 
Why this is so? I thought that I will get kde4.4.4 and its packages. am i wrong somewhere ?
Comment 25 Tomas Trnka 2010-06-14 15:53:54 UTC
This is caused by the protectbase plugin, please add --disableplugin=protectbase to the yum command
Comment 26 Manish Runwal 2010-06-14 16:00:33 UTC
upgrading is started. I will let you know once its finished. I really happy KDE guys are really helpful. thats why I am big fan of you guys hats off. Thank you. I will get back to you tomorrow on this.(As process may take long time to download)
Comment 27 Manish Runwal 2010-06-15 06:53:11 UTC
Created attachment 48021 [details]
Portion of Kde desktop

Hello Tomas,
I did what you have said. even updated to kde 4.4.4 but still didn't find my solution.  even for better understanding I have recorded portion of my desktop.
Comment 28 Tomas Trnka 2010-06-15 08:00:38 UTC
Great, that video helped a lot! Now I at least understand the problem you're getting. However, still can't reproduce this.
Are you running Kate within a GNOME session? Or just using GNOME icons (I can see those in the video) in KDE? Are you also using the GTK+ widget style (or anything else that is not Oxygen)?
Comment 29 Manish Runwal 2010-06-15 08:07:46 UTC
Created attachment 48023 [details]
System Settings

I am using KDE as session. and these are images of system settings.
Comment 30 Manish Runwal 2010-06-15 08:09:29 UTC
One more thing. I am using Workspace as Oxygen theme.
Comment 31 Manish Runwal 2010-06-17 11:14:48 UTC
Any fix? or solution.
Comment 32 Dominik Haumann 2010-06-17 19:57:11 UTC
Manish, you probably will never get a fix for that... No one else can reproduce. Even if it is a bug in Kate, what shall we do?

Try using another theme then. Start "klipper" in case it is not started. Close "clipper" (in the system tray) in case it is running... Check the options in clipper's config dialog... Try to change your X configuration and what not...

Sorry... :(

If you have KDE 4.4, please also build the current development version of Kate according to
http://gitorious.org/kate/pages/Building%20Kate
It's very easy, stable and won't touch your global KDE installation. Is the bug also reproducible here?
Comment 33 Manish Runwal 2010-06-18 07:27:50 UTC
Thank you for so far your help. Might be after some configuration you will be also come across this bug and try it to resolve. I am happy that you have assisted me till the date. Thank you once again.
Comment 34 Dominik Haumann 2010-06-18 08:46:53 UTC
Please compile kate as mentioned in comment #32. Maybe this will help.
Comment 35 Manish Runwal 2010-06-18 12:30:54 UTC
Created attachment 48106 [details]
Command line execution log

These are the command line execution log file. where I have open the kate then selected the text and focused on kate opened another file and refocus on same selection file. I hope now this helps you even more to reach to problem.

My Status: when I compiled kate according to given instruction "http://gitorious.org/kate/pages/Building%20Kate" problem still exist in newly build kate. Let me know if you need anything more.
Comment 36 Manish Runwal 2010-06-18 12:41:42 UTC
Following are with mouse events. I hope this will also helps you.
=================================================================
kate(8694)/Kate (App) KateDocManager::slotDocumentNameChanged: docname changed:  "Untitled" -----> "Untitled"
kate(8694)/Kate (Document) Kate::TextBuffer::load: Loaded file  "/home/Manish/Desktop/page1.txt" with codec "UTF-8" without encoding errors
kate(8694)/Kate (Document) Kate::TextBuffer::load: Didn't find byte order mark
kate(8694)/Kate (Document) Kate::TextBuffer::load: used filter device for mime-type "text/plain"
kate(8694)/Kate (Document) KateModeManager::fileType:
kate(8694)/Kate KateCompletionWidget::deleteCompletionRanges:
kate(8694)/Kate (App) KateDocManager::slotDocumentNameChanged: docname changed:  "Untitled" -----> "page1.txt"
kate(8694)/Kate (App) KateViewDocumentProxyModel::opened: QModelIndex(0,0,0x0,KateViewDocumentProxyModel(0x98aa100) )
kate(8694)/Kate (App) KateDocManager::createDoc: createDoc
kate(8694)/Kate (App) KateDocManager::slotDocumentNameChanged: docname changed:  "Untitled" -----> "Untitled"
kate(8694)/Kate (Document) Kate::TextBuffer::load: Loaded file  "/home/Manish/Desktop/page2.txt" with codec "UTF-8" without encoding errors
kate(8694)/Kate (Document) Kate::TextBuffer::load: Didn't find byte order mark
kate(8694)/Kate (Document) Kate::TextBuffer::load: used filter device for mime-type "text/plain"
kate(8694)/Kate (Document) KateModeManager::fileType:
kate(8694)/Kate (App) KateDocManager::slotDocumentNameChanged: docname changed:  "Untitled" -----> "page2.txt"
kate(8694)/Kate (App) KateContainer::getViewBarParent: window is a KateMainWindow
kate(8694)/Kate (App) KateContainer::addViewBarToLayout: window is a KateMainWindow
kate(8694)/Kate KateCompletionWidget::deleteCompletionRanges:
kate(8694)/Kate (Vi Input Mode) KateViNormalMode::resetParser: ***RESET***
kate(8694)/Kate (Vi Input Mode) KateViNormalMode::resetParser: ***RESET***
kate(8694)/Kate (App) KateViewDocumentProxyModel::opened: QModelIndex(1,0,0x0,KateViewDocumentProxyModel(0x98aa100) )
kate(8694)/Kate KateCompletionWidget::deleteCompletionRanges:
kate(8694)/Kate (App) KateFileList::mouseReleaseEvent: KateFileList::mouseReleaseEvent
kate(8694)/Kate (App) KateViewDocumentProxyModel::opened: QModelIndex(0,0,0x0,KateViewDocumentProxyModel(0x98aa100) )
kate(8694)/Kate (App) KateViewDocumentProxyModel::opened: QModelIndex(0,0,0x0,KateViewDocumentProxyModel(0x98aa100) )
kate(8694)/Kate KateCompletionWidget::cursorPositionChanged:
kate(8694)/Kate KateCompletionWidget::cursorPositionChanged:
kate(8694)/Kate KateCompletionWidget::deleteCompletionRanges:
kate(8694)/Kate (App) KateFileList::mouseReleaseEvent: KateFileList::mouseReleaseEvent
kate(8694)/Kate (App) KateViewDocumentProxyModel::opened: QModelIndex(1,0,0x0,KateViewDocumentProxyModel(0x98aa100) )
kate(8694)/Kate (App) KateViewDocumentProxyModel::opened: QModelIndex(1,0,0x0,KateViewDocumentProxyModel(0x98aa100) )
kate(8694)/Kate KateCompletionWidget::deleteCompletionRanges:
kate(8694)/Kate (App) KateFileList::mouseReleaseEvent: KateFileList::mouseReleaseEvent
kate(8694)/Kate (App) KateViewDocumentProxyModel::opened: QModelIndex(0,0,0x0,KateViewDocumentProxyModel(0x98aa100) )
kate(8694)/Kate (App) KateViewDocumentProxyModel::opened: QModelIndex(0,0,0x0,KateViewDocumentProxyModel(0x98aa100) )
kate(8694)/Kate (App) KateDocManager::slotModChanged1: KateDocManager::slotModChanged (1)
kate(8694)/Kate (App) KateDocManager::slotModChanged1: KateDocManager::slotModChanged (2)
kate(8694)/Kate (App) KateViewDocumentProxyModel::modified: KateViewDocumentProxyModel::modified QModelIndex(0,0,0x0,KateViewDocumentProxyModel(0x98aa100) )
kate(8694)/Kate KateCompletionWidget::cursorPositionChanged:
kate(8694)/Kate KateCompletionWidget::deleteCompletionRanges:

=================================================================
Comment 37 Manish Runwal 2010-06-25 05:55:40 UTC
When I logged in as root and executed kate then this bug doesn't appear on the same machine. may I know what might be reason? deleting existing user will not be good for me. so will you please just focus what might be wrong ?
Comment 38 Manish Runwal 2010-06-26 08:17:57 UTC
Some how I trace from which application it might causing error. from im-chooser if select ibus then this behaviour is occured but if I select "x compose table" then this problem doesn't appears.
Comment 39 Pascal Létourneau 2010-06-29 23:17:35 UTC
SVN commit 1144412 by pletourn:

Remove selection only when receiving input

CCBUG:220308


 M  +2 -3      kateviewinternal.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1144412
Comment 40 Dominik Haumann 2010-07-01 23:17:03 UTC
@Manish: Can you git pull again once Christoph merged Pascal's change to git?
Comment 41 Manish Runwal 2010-07-02 06:02:48 UTC
Yes. I will do it. just let me know after Christoph merged these changes.
Comment 42 Dominik Haumann 2010-07-04 13:15:37 UTC
Merged, you can git pull now :)
Comment 43 Manish Runwal 2010-07-05 07:35:24 UTC
From IM-Chooser (If I select IBus) then its not working properly (behaving same as specified in this bug). But If I select "X compose table" then its working properly.
Comment 44 Tomas Trnka 2010-08-20 23:16:58 UTC
*** Bug 248467 has been marked as a duplicate of this bug. ***
Comment 45 Dominik Haumann 2010-08-20 23:22:36 UTC
Reproducable by others as well now. Close as duplicate and move the important content over to have less text in the report.

*** This bug has been marked as a duplicate of bug 248558 ***