[Github-comments] Re: [geany/geany-plugins] Vimode: Fix cursor hang with folded lines (PR #1326)

2024-05-07 Thread cresto sylvain via Github-comments
@scresto09 pushed 1 commit.

5608b74cba25b571428da9a055e696ddb053a247  Automatically set the cursor position 
on the visible line

-- 
View it on GitHub:
https://github.com/geany/geany-plugins/pull/1326/files/be15445fa3fd4893f04945af6af94522db2e5e99..5608b74cba25b571428da9a055e696ddb053a247
You are receiving this because you are subscribed to this thread.

Message ID: 


[Github-comments] Re: [geany/geany-plugins] Vimode: Fix cursor hang with folded lines (PR #1326)

2024-05-07 Thread cresto sylvain via Github-comments
In response to pull request 
[#1338](https://github.com/geany/geany-plugins/pull/1338) 

After read the 
[https://sourceforge.net/p/scintilla/bugs/2438/](https://sourceforge.net/p/scintilla/bugs/2438/)
 report, I think the best way to automatically set the cursor position on the 
visible line is surely to track the SCN_MARGINCLICK event. I did some 
modification to handle this with the commit 
[5608b74](https://github.com/geany/geany-plugins/pull/1326/commits/5608b74cba25b571428da9a055e696ddb053a247)
 .

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1326#issuecomment-2098517956
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany-plugins] Vimode: Fix cursor hang with folded lines (PR #1326)

2024-05-07 Thread cresto sylvain via Github-comments
@scresto09 pushed 1 commit.

274ff97f51e65b02ae86579768ec8d41f5b5c611  try to fix some issues of the plugin 
with folded lines

-- 
View it on GitHub:
https://github.com/geany/geany-plugins/pull/1326/files/5608b74cba25b571428da9a055e696ddb053a247..274ff97f51e65b02ae86579768ec8d41f5b5c611
You are receiving this because you are subscribed to this thread.

Message ID: 


[Github-comments] Re: [geany/geany-plugins] vimode: Handle folded lines correctly (PR #1338)

2024-05-07 Thread cresto sylvain via Github-comments
Hello,

After read the 
[https://sourceforge.net/p/scintilla/bugs/2438/](https://sourceforge.net/p/scintilla/bugs/2438/)
 report, I think the best way to automatically set the cursor position on the 
visible line is surely to track the SCN_MARGINCLICK event.

I did some modification to handle this with the commit 
[5608b74](https://github.com/geany/geany-plugins/pull/1326/commits/5608b74cba25b571428da9a055e696ddb053a247)
 in pull request [#1326](https://github.com/geany/geany-plugins/pull/1326)

What do you think about this ?
Thanks

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1338#issuecomment-2098571981
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany-plugins] vimode: Handle folded lines correctly (PR #1338)

2024-05-07 Thread cresto sylvain via Github-comments
It seems there are some issues with the changes in commit 
[907b9bc](https://github.com/geany/geany-plugins/pull/1338/commits/907b9bc9830e601119e1d9df9d39848c3f697932),
 for example the cursor can no longer go up to the first line, or when some 
lines wrap.

I've made some changes to try and fix this with the commit 
[274ff97](https://github.com/geany/geany-plugins/pull/1326/commits/274ff97f51e65b02ae86579768ec8d41f5b5c611)
 . What do you think about this ?
Thanks

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1338#issuecomment-209859
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany-plugins] projectorganizer: Add popup panel for navigation (PR #1341)

2024-05-07 Thread Jiří Techet via Github-comments
@techee pushed 6 commits.

6a541d0ab820d830bd0a49c10681c67a9153200d  Add translator comments to file 
navigation strings
4638f25f4ff3dd4cc9e6d270ce7e5168eb20062d  Avoid possible NULL pointer 
dereferences and fix some related problems
290c9a36a08fdffcf587822ee593dc18e6c62aa1  Formatting
5bf7b1ecb441277c016ffc2252828df4e24803e6  Fix lookup function being called 
before initialized in on_entry_text_notify()
ab0e8a81814af49cdab779431b33a5f9555292b5  Optimize prjorg_goto_panel_show(()
4e9eb962e79cca3b0939f41729536d75aafa334e  Allow navigating to non-open project 
files as well

-- 
View it on GitHub:
https://github.com/geany/geany-plugins/pull/1341/files/60b4c81335ca239f8e4d15c2a58e99055b020531..4e9eb962e79cca3b0939f41729536d75aafa334e
You are receiving this because you are subscribed to this thread.

Message ID: 


[Github-comments] Re: [geany/geany-plugins] projectorganizer: Add popup panel for navigation (PR #1341)

2024-05-07 Thread Jiří Techet via Github-comments
@techee commented on this pull request.



> + GPtrArray *arr = g_ptr_array_new_full(0, 
> (GDestroyNotify)prjorg_goto_symbol_free);
+   gint lineno = atoi(line_str);
+   gint linenum = sci_get_line_count(doc->editor->sci);
+   guint i;
+
+   for (i = 0; i < 4; i++)
+   {
+   PrjorgGotoSymbol *sym = g_new0(PrjorgGotoSymbol, 1);
+
+   sym->file_name = utils_get_utf8_from_locale(doc->real_path);
+   sym->icon = _ICON_OTHER;
+
+   switch (i)
+   {
+   case 0:
+   sym->name = g_strdup(_("line typed above"));

Done (also in the LSP plugin).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1341#discussion_r1592761297
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany-plugins] projectorganizer: Add popup panel for navigation (PR #1341)

2024-05-07 Thread Jiří Techet via Github-comments
@techee commented on this pull request.



> + }
+   pos = new_pos;
+   }
+   end_pos = pos;
+
+   if (start_pos == end_pos)
+   return NULL;
+
+   return sci_get_contents_range(sci, start_pos, end_pos);
+}
+
+
+static void goto_panel_query(const gchar *query_type, gboolean prefill)
+{
+   GeanyDocument *doc = document_get_current();
+   gint pos = sci_get_current_position(doc->editor->sci);

Fixed, together with some other issues (also in the LSP plugin).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1341#discussion_r1592762194
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany-plugins] projectorganizer: Add popup panel for navigation (PR #1341)

2024-05-07 Thread Jiří Techet via Github-comments
@techee commented on this pull request.



> + gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &x, &dummy);
+   }
+   return gtk_icon_theme_load_icon(icon_theme, icon_name, x, 0, NULL);
+}
+
+
+static GdkPixbuf *get_icon_pixbuf(gint icon)
+{
+   if (!geany_icons[_ICON_CLASS].pixbuf)
+   {
+   guint i;
+   for (i = 0; i < G_N_ELEMENTS(geany_icons); i++)
+   geany_icons[i].pixbuf = 
get_tag_icon(geany_icons[i].icon_name);
+   }
+
+   if (icon < _N_ICONS)

I'd prefer if 
https://github.com/geany/geany/pull/3849/commits/1931fcc2f4d5de46871c85a782903d8c4d41e699
 from https://github.com/geany/geany/pull/3849 could be merged and used here. 
While the icons can be accessed this way, if someone reorganizes something in 
Geany, it will break. So better have some proper API for accessing these icons.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1341#discussion_r1592766769
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany-plugins] projectorganizer: Add popup panel for navigation (PR #1341)

2024-05-07 Thread Jiří Techet via Github-comments
@techee commented on this pull request.



> +
+   case GDK_KEY_Return:
+   case GDK_KEY_KP_Enter:
+   case GDK_KEY_ISO_Enter:
+   
tree_view_activate_focused_row(GTK_TREE_VIEW(panel_data.tree_view));
+   return TRUE;
+
+   case GDK_KEY_Page_Up:
+   case GDK_KEY_Page_Down:
+   case GDK_KEY_KP_Page_Up:
+   case GDK_KEY_KP_Page_Down:
+   {
+   gboolean up = event->keyval == GDK_KEY_Page_Up || 
event->keyval == GDK_KEY_KP_Page_Up;
+   
tree_view_move_focus(GTK_TREE_VIEW(panel_data.tree_view),
+   GTK_MOVEMENT_PAGES, up ? -1 : 1);
+ return TRUE;

Done.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1341#discussion_r1592767025
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany-plugins] projectorganizer: Add popup panel for navigation (PR #1341)

2024-05-07 Thread Jiří Techet via Github-comments
@techee commented on this pull request.



> +
+   if (!symbols)
+   return ret;
+
+   tf_strv = g_strsplit_set(filter, " ", -1);
+
+   for (i = 0; i < symbols->len && j < 100; i++)
+   {
+   PrjorgGotoSymbol *symbol = symbols->pdata[i];
+   gchar *normalized_name = g_utf8_normalize(symbol->name, -1, 
G_NORMALIZE_ALL);
+   gboolean filtered = FALSE;
+   gchar **val;
+
+   foreach_strv(val, tf_strv)
+   {
+   gchar *normalized_val = g_utf8_normalize(*val, -1, 
G_NORMALIZE_ALL);

Done.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1341#discussion_r1592767221
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany-plugins] projectorganizer: Add popup panel for navigation (PR #1341)

2024-05-07 Thread Jiří Techet via Github-comments
> Apart from that, I was kind of disappointed that the "goto file" only lists 
> Geany open documents rather than the project's documents -- maybe you'd like 
> to add that?

Done in the last commit - open files are sorted before project files and also 
non-open project files don't have any icon in front of them to distinguish them 
from the open files.

> Also, I hoped to be able to go to a specific file's line, not only in the 
> current file -- but that's probably less useful in practice.

Not done now, possibly in the future.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1341#issuecomment-2098858918
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany-plugins] Devhelpplugin (PR #1311)

2024-05-07 Thread @liomarhora via Github-comments
@liomarhora pushed 1 commit.

f11706a66312566b4317b39ad14e54bcf7c4a97a  Update devhelp.m4

-- 
View it on GitHub:
https://github.com/geany/geany-plugins/pull/1311/files/5ab36c4d13ef77f5e1caf2300cfc96e59a3474f8..f11706a66312566b4317b39ad14e54bcf7c4a97a
You are receiving this because you are subscribed to this thread.

Message ID: