Author Topic: RC3 - Using vs during git commit invocation acts funny  (Read 813 times)

astromme

  • Community Member
  • Posts: 89
  • Hero Points: 0
RC3 - Using vs during git commit invocation acts funny
« on: September 28, 2016, 02:20:24 am »
Code: [Select]
[core]
editor = vs +new -snorestore

When the window comes up, sometimes the cursor is at the top in the first column, sometimes it's in the middle of the second column.

If vs crashes, when I restart it the last commit "file" opens up, so I go delete vrestore.slk; then when I restart it comes up with my old view but no project open.

I'd assume it should NEVER open up with the last commit due to -snorestore - do I have something configured wrong?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3942
  • Hero Points: 256
Re: RC3 - Using vs during git commit invocation acts funny
« Reply #1 on: September 28, 2016, 11:46:59 am »
With the -snorestore option, no files are restored. From what I'm seeing no tool windows/tool bars are restored either. Not sure I like that. I'd prefer a default tool window/tool bar layout be used.

When SlickEdit opens a file, it will restore the cursor location to where it was when the file was closed. If you want the cursor at the top of the file, you need to append "-#top-of-buffer" after the filename.

vs +new -snorestore <filename-here> -#top-of-buffer

It looks like when -snorestore is used, the restore information is still saved on exit. So if the next time you invoke SlickEdit, you don't specify -snorestore, you don't get your old vrestore.slk file.  The work around for this is to specify the -sc option and specify a different configuration location (-sc <tempconfig>)

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3942
  • Hero Points: 256
Re: RC3 - Using vs during git commit invocation acts funny
« Reply #2 on: September 28, 2016, 12:23:18 pm »
If you want the default tool window/tool bar layout, use the -#reset-window-layout option. I'd put this option before the filename.

vs +new -snorestore -sc <tempconfig> -#reset-window-layout <filename> -#top-of-buffer

FYI: -#<command> executes the command. Very handy.

astromme

  • Community Member
  • Posts: 89
  • Hero Points: 0
Re: RC3 - Using vs during git commit invocation acts funny
« Reply #3 on: September 28, 2016, 04:50:37 pm »
In this case, I very much prefer having no toolbars - I'm presented with a dirt simple window for entering a commit message which is exactly what I want.  If you tweak a default to include toolbars, please continue to provide a "commit instance".

The #top-of-buffer solution is a bit of a pain - instead of
Code: [Select]
editor = vs +new -snorestore
I need
Code: [Select]
editor = vs_git
along with a new vs_git file that looks like
Code: [Select]
#/bin/bash
vs +new -snorestore "$1" -#top-of-buffer
This works, but now I need the extra script anytime I set up a new virtual machine.

What I really want is a braindead window to open to enter a commit message, save it, close the editor, and pretend all that never happened.  So far,
Code: [Select]
editor = vs +new -snorestore -snoconfig
appears to achieve that.. I'll run with this a while.

astromme

  • Community Member
  • Posts: 89
  • Hero Points: 0
Re: RC3 - Using vs during git commit invocation acts funny
« Reply #4 on: November 09, 2016, 04:43:09 pm »
FYI, my idea didn't work (as I'm sure you must've known).  I had to go back to the extra script which looks like

Code: [Select]
#!/bin/bash
vs +new -snorestore -snoconfig "$1" -#top-of-buffer