This patch reverts an upstream commit that references a non-existent file. --- sakura-git-a169cb472.old/README.md +++ sakura-git-a169cb472/README.md @@ -22,11 +22,6 @@ Use CMAKE_BUILD_TYPE=Debug if you need debug symbols. Default type is "Release". -Make sure your distribution sources the vte script for OSC 7 support in no login shells. If not, please add the following line to you .bashrc: - -```bash -. /etc/profile.d/vte-2.91.sh -``` ## Usage --- sakura-git-a169cb472.old/src/sakura.c +++ sakura-git-a169cb472/src/sakura.c @@ -493,7 +493,6 @@ static void sakura_error (const char *, ...); static void sakura_build_command (int *, char ***); static char * sakura_get_term_cwd (struct sakura_tab *); -static char * sakura_get_term_cwd_osc7 (struct sakura_tab *); static guint sakura_tokeycode (guint key); static void sakura_set_keybind (const gchar *, guint); static guint sakura_get_keybind (const gchar *); @@ -3056,11 +3055,7 @@ if (page >= 0) { struct sakura_tab *prev_term; prev_term = sakura_get_sktab(sakura, page); - /* If OSC7 method doesn't work, use the old one as fallback */ - if ((cwd = sakura_get_term_cwd_osc7(prev_term)) == NULL) { - SAY("osc7 is null"); - sakura_get_term_cwd(prev_term); - } + cwd = sakura_get_term_cwd(prev_term); /* FIXME: Use current_uri from vte */ sk_tab->colorset = prev_term->colorset; } @@ -3536,9 +3531,9 @@ } -/* Legacy function to use as fallback if our shell doesn't emit OSC7. - * Retrieves the CWD of the specified sk_tab page.Original borrowed - * from gnome-terminal. Adapted by Hong Jen Yee and David Gómez */ +/* Retrieve the cwd of the specified sk_tab page. + * Original function was from terminal-screen.c of gnome-terminal, copyright (C) 2001 Havoc Pennington + * Adapted by Hong Jen Yee, non-linux shit removed by David Gómez */ static char * sakura_get_term_cwd(struct sakura_tab* sk_tab) { @@ -3575,25 +3570,6 @@ } return cwd; -} - - -static char * -sakura_get_term_cwd_osc7(struct sakura_tab* sk_tab) -{ - gchar *cwd = NULL; gchar *osc7_hostname = NULL; - const char *osc7_uri = NULL; const char *hostname = NULL; - - osc7_uri = vte_terminal_get_current_directory_uri(VTE_TERMINAL(sk_tab->vte)); - - if (osc7_uri) { - cwd = g_filename_from_uri(osc7_uri, &osc7_hostname, NULL); - /* Check if the hostname matchs. If not, return NULL */ - hostname = g_get_host_name(); - if ((strcmp(osc7_hostname, hostname) != 0) || (strcmp(osc7_hostname, "localhost") == 0)) cwd = NULL; - } - - return cwd; } ==== end of patch ====