123 npos->
file = utf8_filename;
155 g_return_val_if_fail(old_doc ==
NULL || old_doc->
is_valid, FALSE);
156 g_return_val_if_fail(
DOC_VALID(new_doc), FALSE);
157 g_return_val_if_fail(
line >= 1, FALSE);
206 g_warning(
"Attempted navigation when nothing is open");
GeanyDocument * document_get_current(void)
Finds the current document.
GeanyDocument * document_find_by_filename(const gchar *utf8_filename)
Finds a document with the given filename.
Document related actions: new, save, open, etc.
#define DOC_VALID(doc_ptr)
Null-safe way to check GeanyDocument::is_valid.
gboolean editor_goto_pos(GeanyEditor *editor, gint pos, gboolean mark)
Moves to position pos, switching to the document if necessary, setting a marker if mark is set.
static bool match(const unsigned char *line, const char *word)
static GQueue * navigation_queue
void navqueue_go_forward(void)
static void adjust_buttons(void)
static guint nav_queue_pos
void navqueue_go_back(void)
static gint find_by_filename(gconstpointer a, gconstpointer b)
gboolean navqueue_goto_line(GeanyDocument *old_doc, GeanyDocument *new_doc, gint line)
Adds old file position and new file position to the navqueue, then goes to the new position.
static void add_new_position(const gchar *utf8_filename, gint pos)
static gboolean queue_pos_matches(guint queue_pos, const gchar *fname, gint pos)
static gboolean goto_file_pos(const gchar *file, gint pos)
static GtkAction * navigation_buttons[2]
void navqueue_remove_file(const gchar *filename)
gint sci_get_current_position(ScintillaObject *sci)
Gets the cursor position.
gint sci_get_position_from_line(ScintillaObject *sci, gint line)
Gets the position for the start of line.
Wrapper functions for the Scintilla editor widget SCI_* messages.
Structure for representing an open tab with all its properties.
gchar * file_name
The UTF-8 encoded file name.
gboolean is_valid
Flag used to check if this document is valid when iterating GeanyData::documents_array.
GeanyEditor * editor
The editor associated with the document.
ScintillaObject * sci
The Scintilla editor GtkWidget.
gboolean utils_str_equal(const gchar *a, const gchar *b)
NULL-safe string comparison.
General utility functions, non-GTK related.