From c2a14230edb7938181af898b288f9a6b1835e651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sat, 5 Nov 2022 11:56:10 +0100 Subject: [PATCH] Version control: check more editors for filling the EDITOR environment variable. [DEVELOPMENT ENVIRONMENT] * NEW: Version control: check more editors for filling the EDITOR environment variable. --- .../.src/VersionControl/VersionControl.module | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/gambas3/.src/VersionControl/VersionControl.module b/app/src/gambas3/.src/VersionControl/VersionControl.module index 3cda805c2..b90170c32 100644 --- a/app/src/gambas3/.src/VersionControl/VersionControl.module +++ b/app/src/gambas3/.src/VersionControl/VersionControl.module @@ -50,21 +50,24 @@ End Private Sub GetTextEditor() As String + Dim aProg As String[] Dim sProg As String If Desktop.Is("kde4") Or If Desktop.Is("kde5") Then - sProg = "kwrite" + aProg = ["kwrite"] Else If Desktop.Is("xfce") Then - sProg = "mousepad" + aProg = ["mousepad"] Else If Desktop.Is("lxde") Then - sProg = "leafpad" + aProg = ["leafpad"] Else If Desktop.Is("mate") Then - sProg = "pluma" + aProg = ["pluma"] Else - sProg = "gedit" + aProg = ["gnome-text-editor", "gedit"] Endif - For Each sProg In [sProg, "kwrite", "kate", "gedit", "emacs"] + aProg.Insert(["kwrite", "kate", "gnome-text-editor", "gedit", "editor", "emacs", "vim"]) + + For Each sProg In aProg If System.Exist(sProg) Then Return sProg Next