Open rcastagno opened 2 years ago
Hi, which plugin and IDE versions are you using ?
Hi, which plugin and IDE versions are you using ?
Right:
IntelliJ IDEA 2021.3.1 (Ultimate Edition) Build #IU-213.6461.79, built on December 28, 2021
Plugin version: 212.8.4
BTW, some additional pieces of information:
I cannot reproduce it. What other plugins do you have installed ? Maybe it's some interaction that is causing this.
Good catch! Yes and no.
I'll try to explain.
I see it live because I'm using File Watchers plugin.
The rule I'm using is configured with this flag set: "Auto-save edited files to trigger the watcher"
Which points to the real issue. [UPDATE] Which is, the problem happens when file is saved!
To reproduce: 1) open a file in a git project 2) do something that creates a new line with auto-indent (like, press "enter" at the end of an indented line) 3) alt+tab to change window; this should trigger Idea auto-save 4) alt+tab back to Idea 5) press any key
https://user-images.githubusercontent.com/198684/149148353-d28c2e46-c6b0-4cf0-8a5d-64bb7078248e.mp4
Does the action you have hooked to file watcher modify the file ?
There is an issue that I'm aware of that affects inline blame when file is changed externally - for example when you do Revert from IDE.
The test I've recorded in the mini-screencast I've done after disabling File Watchers.
I simply do:
What's modifying the file is "General \ On save \ Remove trailing spaces on: all lines"
What about OS and file type ? Maybe they somehow factor into this.
A small update. I have found a property in the IDE API that I'm using for inline blame that might cause this behaviour - namely caret being positioned after the blame. I'll create a dev build soon so that we can test it out.
Dev build is ready gittoolbox-212.8.5-SNAPSHOT.zip
Tried the dev build, but it seems it still does the same effect.
OS: Windows File type: cfc/cfm (coldfusion) and java
Small update - still no luck reproducing this issue.
I've had this issue for year.
To reproduce the issues resize the editor so the blame is shown off screen Press right arrow to move caret to the end of the line, then press again and the caret will move to the end of the blame text Press up or down arrow and the editor will scroll horizontally.
Does not occur when turning "Show Inline Blame" off as shown in the second half of the recording.
https://github.com/zielu/GitToolBox/assets/97417601/a7765f59-5335-4440-b60e-10733c808e4d
WebStorm 2024.1 Build #WS-241.14494.235, built on March 28, 2024 Runtime version: 17.0.10+8-b1207.12 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 14.0 GC: G1 Young Generation, G1 Old Generation Memory: 16384M Cores: 10 Metal Rendering is ON Registry: ide.tooltip.initialDelay=0 ide.balloon.shadow.size=0 editor.distraction.free.mode=true debugger.new.tool.window.layout=true ide.new.editor.tabs.vertical.borders=true ide.animate.toolwindows=true ide.experimental.ui=true ide.editor.tab.selection.animation=true terminal.new.ui=true ide.images.show.chessboard=true Non-Bundled Plugins: quokka.js (1.0.443) com.intellij.properties (241.14494.150) ru.adelf.idea.dotenv (2024.1) DBN (3.4.3211.0) PlantUML integration (7.10.1-IJ2023.2) com.github.copilot (1.5.2.5345) com.mallowigi (95.0.0) com.ramusthastudio.plugin.unixtimestamp (6.3.0) com.chrisrm.idea.MaterialThemeUI (9.2.1) com.intellij.lang.jsgraphql (241.14494.150) zielu.gittoolbox (500.2.6+233) org.jetbrains.plugins.stylus (241.14494.140)
Note to self: it's related to Editor > General > Virtual Space > Allow caret placement: After the end of line
being enabled
@ramonfallon I played around and found two things:
Can't say exactly when this started, but it happens continuously.
What happens is that the cursor is placed incorrectly when inline blame is active, and is configured "After line".
The consequence is that when I start typing, the cursor is not where I expect it to be.
For example, I place cursor at the end of a line and press enter; for an instant it appears like this:
but immediately becomes this:
and if I start typing, this is what happens:
(note: the character is one position left of where expected)