Mercurial > octave
diff libgui/src/m-editor/file-editor-interface.h @ 25743:c2a703df0215
preserve tab position and line when reloading renamed editor file (bug #49322)
* file-editor-interface.h: tab index as new argument for request_open_file
* file-editor.cc (restore_session): session_data now with line number
and new file name after rename;
(handle_file_remove): store data of file to remove in the struct
session_data and append it to the list of all removed/renamed files;
(handle_file_renamed): reload all files at desired tab indexes and line
numbers that were previously renamed based on data stored in the list
of structures;
(request_open_file): new argument: desired tab index, also passed to
add_file_editor_tab;
(add_file_editor_tab): new argument: desired tab index
(handle_dir_remove): use list of session_data structures to store data
of removed/renamed files in a directory;
* file-editor.h: extended session data by new_file_name and line,
request_open_file and add_file_editor_tab with tab index as additional
argument, list of session_data structures instead of list of strings
for the file data
author | Torsten <mttl@mailbox.org> |
---|---|
date | Sun, 05 Aug 2018 21:45:08 +0200 |
parents | d3c6de326bae |
children | 00f796120a6d |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-interface.h Sun Sep 17 05:52:33 2017 +0200 +++ b/libgui/src/m-editor/file-editor-interface.h Sun Aug 05 21:45:08 2018 +0200 @@ -83,7 +83,8 @@ bool debug_pointer = false, bool breakpoint_marker = false, bool insert = true, - const QString& cond = "") = 0; + const QString& cond = "", + int index = -1) = 0; }; }