insou22 / mipsy

Education-focused MIPS Emulator written in Rust.
86 stars 13 forks source link

MIPSY cursor caret restarts on save. #262

Closed kerelostawfik12 closed 2 years ago

kerelostawfik12 commented 2 years ago

When using MIPSY web everytime you save the cursor caret position is restarted to the start of the page so everytime i save and press the left (->) arrow key or any arrow key it scrolls me back to the start. This is annoying for the assignment and bigger files where you have to scroll through the code so many times just to fix it. Just wondering if it could be changed so the caret position is saved when you save the file so we're not forced to scroll through code repeatedly scroll through code to get to the desired function we want to change everytime we save. A setting could be added in options for people who would like this feature to still exist.

kerelostawfik12 commented 2 years ago

Love mipsy web not trying to hate, better than anything I could've made and I know it's probably very hard to implement such features.

Dylan-Brotherston commented 2 years ago

A setting could be added in options for people who would like this feature to still exist. I don't see a reason to keep the old behavior.

We will likely have to copy out the state of monaco and replace it on each save.

SpanishPear commented 2 years ago

@kerelostawfik12 Thanks for the feature suggestion! I also get very annoyed at this happening (today even!!) - so definitely understand.

Luckily this notification came in juuuuuust as I was about to stop working on mipsy_web for the next little bit, so I got some last minute motivation to try and get this up and running :)