Author Topic: B2: spurious Enter key after opening project  (Read 1660 times)

jnairb

  • Senior Community Member
  • Posts: 221
  • Hero Points: 11
B2: spurious Enter key after opening project
« on: August 04, 2016, 04:06:15 pm »
Weird problem, but it seems reproducible for me... I'm running on Windows 7 x64. After I start SlickEdit, I open the workspace list (workspace-show bound to Ctrl-P for me), select a project by typing the 1st char of the workspace folder then 1st char of workspace name, and press Enter to open the project. It takes a few seconds to load open files, etc and SlickEdit shows an hour-glass (mouse pointer), but once it's ready, an Enter is entered into the current file at the saved cursor position. (I have multiple files/window, just one file window in this case.)

If I close the project and reopen the same way, I don't see an Enter entered into the file. If I close SlickEdit and restart, and repeat the project open the same way, I see an Enter entered into the file again.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4898
  • Hero Points: 399
Re: B2: spurious Enter key after opening project
« Reply #1 on: August 04, 2016, 04:31:14 pm »
Make a copy of your config directory so this little bugger doesn't run away.

Can you reproduce this starting with a clean config and a few tweaks?

vs +new -sc <dir-does-not-exist-yet>

jnairb

  • Senior Community Member
  • Posts: 221
  • Hero Points: 11
Re: B2: spurious Enter key after opening project
« Reply #2 on: August 04, 2016, 04:51:10 pm »
I can't reproduce it when starting with a new config with minimal modifications (just set Brief emulation, bound Alt-P to workspace-organize, and added a folder and the same project to the workspace list). (I was actually using workspace-organize to open the list of workspaces, bound to Alt-P for me. My fingers remember what keys to press, but sometimes I don't. :-)

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4898
  • Hero Points: 399
Re: B2: spurious Enter key after opening project
« Reply #3 on: August 04, 2016, 05:10:44 pm »
Can you reproduce this with a different workspace like maybe one of our projects? If so, then we should be able to reproduce this here.

jnairb

  • Senior Community Member
  • Posts: 221
  • Hero Points: 11
Re: B2: spurious Enter key after opening project
« Reply #4 on: August 04, 2016, 06:06:24 pm »
I had previously deleted the sample workspaces, but I remigrated from 20.0.3 and they were added back to the workspace organizer list, and copied the Sample project files from the new config directory I'd tried. I can't recreate the problem with the Sample Projects, and I also can't recreate with any of my other projects that I've tried so far. But I can still recreate (even after re-migrating my 20.0.3 config to 21) with the original project that I first hit this. So that's the only one. I don't know how it's different than any of the other projects I have.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4898
  • Hero Points: 399
Re: B2: spurious Enter key after opening project
« Reply #5 on: August 04, 2016, 07:19:41 pm »
Sounds like we need your workspace file, project files, and .vpwhist. We can dummy up source files that are being auto restored. Hopefully, it's not that picky about the exact contents of the source files.

Can you zip this up and upload them?

To upload: Go to http://support.slickedit.com. Use 13657 (this topic id) for the case id.

Once it is uploaded, post here to let me know.

Thanks

jnairb

  • Senior Community Member
  • Posts: 221
  • Hero Points: 11
Re: B2: spurious Enter key after opening project
« Reply #6 on: August 04, 2016, 08:33:09 pm »
I uploaded the files as 13657.zip with case ID 13657. I tried to trim down the list of open files listed in the .vpwhist and when I closed all the files in R/O directories, I could no longer recreate the problem, so I restored the vpwhist with all the original open files. The files in Z:\usr6\bej\... are R/W, while everything else is R/O. (I don't know that that makes any difference, though.) Hopefully you can reproduce this without the actual files.

To recreate, I was doing the following: vs -sc C:\13657; Alt-p (workspace-organize); 'C' (select the Comm folder in the list); (pause) '7' (select the workspace); Enter.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4898
  • Hero Points: 399
Re: B2: spurious Enter key after opening project
« Reply #7 on: August 04, 2016, 10:37:37 pm »
You did a nice job packing it up. Thanks for including your config too. I created a macro to construct all the files. Even set all the files under z:\lande as R/O. The files get auto-restored but nothing is modified in the file I'm looking at after I open the project (I diffed it against the original file).

There must be a subtle difference.

I assume the file being modified is the one your looking at after the project files are auto-restored. Maybe if you send me a munged version of this file, I'll be able to reproduce it.

Here's a regex that will replace every byte but line endings with an 'x'
c/{(#[[\0-\255]^[\r\n]])}/x/yr

Execute the above command from the SlickEdit command line. It can be done in Perl too but I'm better at SlickEdit regular expressions. The GUI find dialogs don't support that 'y' option yet. It's handy for matching bytes. It works for Unicode files and SBCS/DBCS files!

jnairb

  • Senior Community Member
  • Posts: 221
  • Hero Points: 11
Re: B2: spurious Enter key after opening project
« Reply #8 on: August 04, 2016, 11:05:03 pm »
Yes, the file being modified is the current file in the file window once everything is restored. I uploaded a munged zip of the file to the same support case, but I don't think the file is the key.

With my test config and project, I tried several times to change the current file before closing the workspace, and then checking what happened when I tried to recreate -- each time it recreated, regardless of which was the current file. And when the current file was R/O, instead of being modified, I got a pop-up saying the command was not allowed in read only mode (same as I would if I press Enter in a R/O file).

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4898
  • Hero Points: 399
Re: B2: spurious Enter key after opening project
« Reply #9 on: August 04, 2016, 11:47:29 pm »
Darn, no luck.

Just curious. If you double click (or click on Open Workspace), does the problem still happen? I'm just wondering if it has anything to do with the Enter key.

jnairb

  • Senior Community Member
  • Posts: 221
  • Hero Points: 11
Re: B2: spurious Enter key after opening project
« Reply #10 on: August 05, 2016, 12:09:21 am »
I hadn't tried not using the Enter key to open the workspace because I assumed it had to be connected to that. But I did now try doing everything the same (Alt+p, C, 7) and then instead of pressing Enter, I clicked on Open Workspace with my mouse. It does NOT happen then.

Also, the first time I hit this problem, I thought I must have hit Enter twice or something and tried to make sure I did a real quick tap of the Enter when I've tried to recreate it, but that didn't make any difference. And right now, I'm actually connected via Remote Desktop and I can still recreate it when I use Enter to open the workspace, so it's not just something flaky with my keyboard. (And I haven't noticed double Enters elsewhere.)

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4898
  • Hero Points: 399
Re: B2: spurious Enter key after opening project
« Reply #11 on: August 05, 2016, 12:20:15 am »
It definitely has something to do with using Enter there. Sounds like some how were are processing the Enter key twice.

What if you put focus on the Open Workspace button and use the Enter key on it? I'm guessing it won't happen.

jnairb

  • Senior Community Member
  • Posts: 221
  • Hero Points: 11
Re: B2: spurious Enter key after opening project
« Reply #12 on: August 05, 2016, 01:54:29 pm »
Your guess was right: if I Tab after selecting the workspace so the Open Workspace button has the focus and then press Enter, I am NOT seeing an Enter entered into the file.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4898
  • Hero Points: 399
Re: B2: spurious Enter key after opening project
« Reply #13 on: August 05, 2016, 01:59:31 pm »
Even though we can't reproduce it here, this gives me a some good ideas for tracking this down any way. We will just need to trace the Enter event handling carefully. Hopefully, we will find something that looks wonky.