retext icon indicating copy to clipboard operation
retext copied to clipboard

Unexpected change of tab

Open muessjoeh opened this issue 6 years ago • 17 comments

Hello!

When I open more than one file, one tab for each file is opened. When I edit in one tab, the focus changes regularly every few seconds so that I am editing another buffer.

muessjoeh avatar Jan 13 '19 20:01 muessjoeh

Can you please give more detail? What is your OS, desktop environment, what are versions of ReText and Qt?

Maybe you can record a screencast demonstrating this?

mitya57 avatar Jan 13 '19 21:01 mitya57

I am using Kubuntu 18.10, running the standard KDE and the standard ReText 7.0.3 and Qt 5.11.1. How do I record a screencast?

muessjoeh avatar Jan 13 '19 21:01 muessjoeh

When I am trying to reproduce this effect with a minimal example, this effect does not occur any more. Strangely, with the original files, this error still occurs, but I do not want to show these files publicly.

muessjoeh avatar Jan 13 '19 22:01 muessjoeh

Maybe some part of original files would be enough to trigger it?

Will it be an option to send them to me in private? mitya57 at gmail.com

mitya57 avatar Jan 14 '19 06:01 mitya57

I now could reproduce the tab change: The edited files have to be in a directory that is supervised by TeamDrifve (see https://teamdrive.com/), which is an encrypted storage space in the internet that can be accessed by other devices (like an encrypted dropbox). The directory is a normal local directory, and a demon looks whether any of the files in this directory has changed, and mirror it there if so. The file date is not affected by this. How can I find out what is causing the tab change?

muessjoeh avatar Jan 14 '19 23:01 muessjoeh

Is this issue abandoned or is it still active?

I also found that not only tabs are affected, but also the cursor position, which is making this program completely useless for me.

Is there an easy way to find out what triggers this strange changes? By the way, you can try Teamdrive yourself, which is a no-cost-service for 2GB storage, so you do not need to give me the corresponding credentials.

muessjoeh avatar Mar 13 '19 20:03 muessjoeh

Sorry, I do not remember why I did not reply to you last time. I will try to look at this again soon.

mitya57 avatar Mar 14 '19 20:03 mitya57

Can you please test if the latest commit in master fixes the issue for you?

mitya57 avatar Mar 19 '19 16:03 mitya57

Semi-good news. The tabs stay the same, but the cursor position still changes.

muessjoeh avatar Mar 19 '19 20:03 muessjoeh

Can you describe how exactly it changes? Do you have unsaved changes at that moment?

mitya57 avatar Mar 19 '19 20:03 mitya57

This happens when there are unsaved changes, or when the files are not touched at all. So, the position change is independent of this.

muessjoeh avatar Mar 19 '19 21:03 muessjoeh

Where does the cursor jump? To the beginning of the file, to the end, or to some other place?

mitya57 avatar Mar 19 '19 21:03 mitya57

Yes. To the beginning of the file.

muessjoeh avatar Mar 19 '19 21:03 muessjoeh

I installed TeamDrive today, and I could not reproduce this issue — the cursor does not change for me.

So I have to ask you more questions:

  • Do you have any non-default configuration options enabled? Like auto-save or FakeVim editing mode? Maybe you can attach your configuration file?
  • Does this happen with all files in TeamDrive?
  • Does this happen with files outside TeamDrive directory, if you run touch filename in the console while having that file opened in ReText?
  • Does this happen only when you edit text, or even when you are not doing anything in ReText? I.e. can it happen when the ReText window is unfocused/minimized?

mitya57 avatar Apr 06 '19 21:04 mitya57

  • No, I do not have anything special configured, it is just a plain vanilla version of Retext, only installed with sudo apt install retext
  • For all the files that I have tested
  • Touching a non-mirrored file does move the cursor to the beginning. So the behavior can be simulated this way
  • Yes, this also happens in the background

muessjoeh avatar Apr 07 '19 20:04 muessjoeh

Same bug if <link rel="stylesheet" type="text/css" href="style.css"> on one of the tabs, fixed by adding # like #<link rel="stylesheet" type="text/css" href="style.css">

myaunian avatar May 06 '19 00:05 myaunian

@myaunian Interesting. Do you experience cursor change or tab change? Do you use any synchronization service or are these normal local files? Can you attach an example file?

mitya57 avatar May 06 '19 05:05 mitya57