From cafd5a386228c3dd4557badb3b517af14ed3c520 Mon Sep 17 00:00:00 2001
From: Ivica Ico Bukvic <ico@vt.edu>
Date: Wed, 25 Apr 2012 22:04:45 -0400
Subject: [PATCH] fixed noselect bug when line is selected and one clicks on a
 blank canvas which should also deselect selected line. also made pd_extrapath
 struct global as part of s_stuff.h so that ggee/image can use dynamic
 descriptors for retrieving of files (.e.g @pd_extra is translated to the pd's
 system-wide location of the extra/ folder)

---
 src/g_editor.c | 2 +-
 src/s_path.c   | 2 --
 src/s_stuff.h  | 1 +
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/g_editor.c b/src/g_editor.c
index 6a5c3d925..6dbb8fddb 100644
--- a/src/g_editor.c
+++ b/src/g_editor.c
@@ -2873,7 +2873,7 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
     canvas_setcursor(x, CURSOR_EDITMODE_NOTHING);
     if (doit)
     {
-        if (!shiftmod && x->gl_editor->e_selection) {
+        if (!shiftmod && (x->gl_editor->e_selection || x->gl_editor->e_selectedline)) {
 			//t_undo_redo_sel *buf = (t_undo_redo_sel *)getbytes(sizeof(*buf));
 			//buf->u_undo = (t_undo_sel *)canvas_undo_set_selection(x);
 
diff --git a/src/s_path.c b/src/s_path.c
index f25aef59a..a96e5f52c 100644
--- a/src/s_path.c
+++ b/src/s_path.c
@@ -213,8 +213,6 @@ char *namelist_get(t_namelist *namelist, int n)
     return (nl ? nl->nl_string : 0);
 }
 
-static t_namelist *pd_extrapath;
-
 int sys_usestdpath = 1;
 
 void sys_setextrapath(const char *p)
diff --git a/src/s_stuff.h b/src/s_stuff.h
index 8c77f850b..0ec5be662 100644
--- a/src/s_stuff.h
+++ b/src/s_stuff.h
@@ -15,6 +15,7 @@ typedef struct _namelist    /* element in a linked list of stored strings */
     char *nl_string;            /* the string */
 } t_namelist;
 
+t_namelist *pd_extrapath;
 t_namelist *namelist_append(t_namelist *listwas, const char *s, int allowdup);
 t_namelist *namelist_append_files(t_namelist *listwas, const char *s);
 void namelist_free(t_namelist *listwas);
-- 
GitLab