sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
276 stars 14 forks source link

Sublime Merge silently fails to open custom editor under certain conditions #1819

Open alexchexes opened 1 year ago

alexchexes commented 1 year ago

Version info

Description

I have set VS Code as the default editor for Sublime Merge. Here are the settings:

{
    "side_bar_layout": "locations_as_column",
    "expand_untracked_files_by_default": false,
    "font_size": 11,
    "diff_algorithm": "match_git",
    "ignore_diff_white_space": false,
    "always_show_command_status": true,
    "editor_path": "C:\\Users\\Alex\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
    "editor_argument_format": "--goto ${file}:${line}:${col}",
    "editor_wait_args": "--wait"
}

It works fine when I open the Sublime Merge executable from the desktop shortcut, start menu, or even via the smerge . command.

However, if Sublime Merge is opened from VS Code (specifically, via a plugin called Sublime Merge for VSCode, which appears to use smerge.exe with some parameters to launch Sublime Merge), Sublime Merge fails to open the editor. This could potentially be due to the way the VS Code plugin launches Sublime Merge. However, even if that is the case, the absence of any error logs or messages in Sublime Merge makes it feel like Sublime Merge's issue in the first place.

Steps to Reproduce

  1. Set VS Code as the default editor in Sublime Merge preferences with the settings as defined above.
  2. Install Sublime Merge for VSCode plugin.
  3. Open Sublime Merge from VS Code using any of the options provided by that plugin (e.g., via right-click → Open repository in Sublime Merge).
  4. Try to perform any action in Sublime Merge that should normally open the specified editor, such as "Open in editor..." or simply try "Preferences → Edit settings...". Sublime Merge doesn't open editor either way.

Expected Behavior

One of the following should occur: a) The specified custom editor (i.e., VS Code) opens when you click on "Open in editor..." or "Preferences → Edit settings..." b) The Sublime Merge console displays an error or otherwise indicates why the editor was not opened.

Debug Information

The problem persists regardless of the repository.

=== App Version Information ===
Build: 2083

=== Git Version Information ===
Using Git: C:\Program Files\Sublime Merge\Git\cmd\git.exe (bundled)
git version 2.39.1.windows.1
PATH: C:\Program Files\Python311\Scripts\;C:\Program Files\Python311\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files\Git;C:\Program Files\PuTTY\;C:\Program Files\dotnet\;C:\php;C:\php\PHP_CodeSniffer-3.7.1\bin;C:\Program Files\Mullvad VPN\resources;C:\Program Files\nodejs\;C:\Program Files\Sublime Merge;C:\Users\Alex\AppData\Local\Microsoft\WindowsApps;C:\Users\Alex\AppData\Local\GitHubDesktop\bin;C:\Users\Alex\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Alex\AppData\Roaming\npm

=== Browse Page Information ===
HEAD: e8a754777bd400ecf87e8c6eeea8569d4846d357
Is in merge: 0
Is in cherry_pick: 0
Is in rebase: 0
Is in revert: 0

=== Git Status Information ===

=== Our Status Information ===

=== Git Config Information ===
alias.br=branch
alias.ci=commit
alias.co=checkout
alias.last=log -1 HEAD
alias.lgd=log --oneline --decorate
alias.lod=log --oneline --decorate
alias.lodga=log --oneline --decorate --graph --all
alias.logod=log --oneline --decorate
alias.rso=remote show origin
alias.st=status
alias.undo=checkout --
alias.unstage=reset HEAD --
branch.main.merge=refs/heads/main
branch.main.remote=origin
color.interactive=true
color.ui=auto
core.autocrlf=false
core.bare=false
core.editor="C:\\Program Files\\Sublime Text\\subl.exe" -w
core.filemode=false
core.fscache=true
core.ignorecase=true
core.logallrefupdates=true
core.repositoryformatversion=0
core.symlinks=false
credential.helper=wincred
credential.https://dev.azure.com.usehttppath=true
credential.https://github.com.usehttppath=true
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.smudge=git-lfs smudge -- %f
help.format=html
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
include.path=C:/Program Files/Git/etc/gitconfig
init.defaultbranch=master
pack.packsizelimit=2g
pull.rebase=false
rebase.autosquash=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=https://github.com/symfony/demo.git
safe.directory=E:/REDACTED
user.email=REDACTED@REDACTED.REDACTED
user.name=Alex

=== Our Config Information ===
Git Config Path Information
Using config path: /C/ProgramData/Git/config
Using config path: /C/Program Files/Sublime Merge/Git/etc/gitconfig
Using config path: /C/Users/Alex/.config/git/config
Using config path: /C/Users/Alex/.gitconfig
Using config path: /e/Dropbox/Projects/Knowledge, examples/Code (study)/symfony-demo-project/.git/config

Our config output is identical to the Git config output

=== Git Attributes Information ===
git check_attr --all output

=== Our Modified Files Newline Normalisation and EOL Information ===

=== Our Modified Files Flag Information ===
Ignoring symlinks: 1

Screenshots

A screencapture illustrating the problem is provided. First, I open Sublime Merge from the desktop shortcut, and the editor opens as expected. Then, I open it from VS Code, and the described problem occurs.

https://github.com/sublimehq/sublime_merge/assets/49966773/3becba07-89e0-48fc-a9b0-2bad65b17ab3

alexchexes commented 9 months ago

Hello, any update on considering this issue?