Skip to content

Commit

Permalink
Merge branch 'geany:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex313031 committed Aug 3, 2024
2 parents 15304af + edd7330 commit c034c7a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:

linux-meson:
name: Linux Meson Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

strategy:
fail-fast: false
Expand Down
5 changes: 3 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('geany', 'c', 'cpp',
meson_version: '>= 0.53',
meson_version: '>= 0.56',
version: '2.1',
default_options : ['c_std=c11', 'cpp_std=c++17'])

Expand Down Expand Up @@ -904,7 +904,8 @@ executable('geany',
dependencies: deps,
build_rpath: meson.build_root(),
install_rpath: '$ORIGIN/../' + get_option('libdir'),
install: true
install: true,
win_subsystem: 'windows',
)

i18n = import('i18n')
Expand Down
6 changes: 5 additions & 1 deletion src/document.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,10 @@ GeanyDocument *document_get_from_notebook_child(GtkWidget *page)
GEANY_API_SYMBOL
GeanyDocument *document_get_from_page(guint page_num)
{
gint pages = gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook));
GtkWidget *parent;

if (page_num >= documents_array->len)
if (page_num >= pages)
return NULL;

parent = gtk_notebook_get_nth_page(GTK_NOTEBOOK(main_widgets.notebook), page_num);
Expand Down Expand Up @@ -1266,6 +1267,9 @@ void document_apply_indent_settings(GeanyDocument *doc)

void document_show_tab(GeanyDocument *doc)
{
if (!doc)
return;

gtk_notebook_set_current_page(GTK_NOTEBOOK(main_widgets.notebook),
document_get_notebook_page(doc));

Expand Down

0 comments on commit c034c7a

Please sign in to comment.