Ticket #4207: FindTagSymbol.patch

File FindTagSymbol.patch, 1.1 KB (added by psprint, 15 months ago)
  • src/editor/editcmd_dialogs.c

    From 1054155af26f75caf56fab796fed2547e0f2a83d Mon Sep 17 00:00:00 2001
    From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
    Date: Thu, 18 Feb 2021 23:52:10 -0600
    Subject: Fix "Find declaration" disrupting file's path
    
    ---
     src/editor/editcmd_dialogs.c | 5 ++++-
     1 file changed, 4 insertions(+), 1 deletion(-)
    
    diff --git a/src/editor/editcmd_dialogs.c b/src/editor/editcmd_dialogs.c
    index 8b3634f23..786cbb4dc 100644
    a b editcmd_dialog_select_definition_show (WEdit * edit, char *match_expr, int max_l 
    483483        { 
    484484            vfs_path_free (edit_history_moveto[edit_stack_iterator].filename_vpath); 
    485485 
    486             if (edit->dir_vpath != NULL) 
     486            /* Is file path absolute? Prepend with dir_vpath if necessary */ 
     487            if (edit->filename_vpath != NULL 
     488                && !IS_PATH_SEP (*vfs_path_as_str (edit->filename_vpath)) 
     489                && edit->dir_vpath != NULL) 
    487490                edit_history_moveto[edit_stack_iterator].filename_vpath = 
    488491                    vfs_path_append_vpath_new (edit->dir_vpath, edit->filename_vpath, NULL); 
    489492            else