JetBrains / ForTea

Apache License 2.0
56 stars 10 forks source link

Strange cursor behavior #24

Closed Trigun27 closed 4 years ago

Trigun27 commented 4 years ago

The issue is that the extension does something with the editor, that makes it uncontrollable. Sometime when I hit enter it jumps into a line of the an object initializer, removes everything before and including the equal sign and adds the text "partial class" to the bottom of the file.

Video example, start after second 9 https://youtu.be/znl1faL-wWY

TimSirmovics commented 4 years ago

I also have strange behaviour. One of the common ones is when I paste, it moves the cursor up into the middle of a line above and then pastes there. I can record a GIF if required as it's a bit hard to explain.

kirillgla commented 4 years ago

Thank you for the reports! It would help me a lot in debugging this issue if you attach a code sample on which the strange behaviour reproduces. Thank you in advance!

TimSirmovics commented 4 years ago

I find the issue when editing a file included with the Entity Framework Reverse POCO Generator. https://reversepoco.co.uk/

You add this as an extension, then use the Add Item dialog to add 2 files into your project: a .tt and a .ttinclude.

The .ttinclude is where I have the problem. This file is almost 18k lines long. Try editing it around line 2630.

TimSirmovics commented 4 years ago

@kirillgla Do you need some more details?

kirillgla commented 4 years ago

Thank you for the repro. I've already managed to reproduce the issue and started investigating it. A smaller repro solution would definitely help, though

ltrzesniewski commented 4 years ago

@kirillgla I've noticed that selecting a few lines of text outside of <#...#> regions and pressing tab will replace the text with a tab instead of indenting it. Shift+Tab works fine though.

I can open a different issue for this if you prefer.

kirillgla commented 4 years ago

@ltrzesniewski, thanks for reporting that. Yes, I believe that it's a completely different problem, so please, open a new issue

OlgaV23 commented 4 years ago

Hello @ltrzesniewski The issue with TAB seems similar to the https://youtrack.jetbrains.com/issue/RSRP-474524 You may follow and upvote the ticket.

ltrzesniewski commented 4 years ago

@OlgaAtJetBrains Thanks, I added your link to #29 as well.

kirillgla commented 4 years ago

Hello everyone and thank you for your patience! I think I figured out why the plugin did that. The fix will be publicly available on the next 2020.2 EAP. Here's a build for Rider 2020.1 that includes the fix in case you want to try it right away. As always, any feedback on whether or not this solves the problem for you is welcome!

kirillgla commented 4 years ago

Hello everyone. This is a friendly reminder that this custom build is only compatible with Rider 2020.1, so if you experience any issues after updating to another version of Rider, consider uninstalling the plugin. It can be done from the home screen by using Configure > Plugins > ForTea > Uninstall. That would replace the custom installation with a bundled one

tolgaong commented 4 years ago

whenever I paste a code into t4 template it changes some of the content and puts partial class keywords. Is it a resolved issue for resharper?

kirillgla commented 4 years ago

Hello @tolgaong; I only debugged this in Rider, so maybe not. I can investigate your case if you tell me your version of ReSharper and your version of the ForTea plugin