I've written some code that lets you save and restore the active editor windows and line numbers for the document groups in the current window. So you could set up two views into the same buffer in two different windows, then call save_win_list. To restore, call restore_win_list. It took a lot of trial and error and it might not be exactly what you want but you can probably change it or ask slickedit support for help, since you have maintenance and support. e.g. currently if one of the edit windows has been closed before you run the restore, it doesn't get re-opened.
You might be able to add a wrapper around pop-bookmark that can figure out whether you need to adjust the active windows and line numbers if pop-bookmark has done the wrong thing. You could also generalize it so that there is one "win_list" array for every buffer.
You can also use the slickedit functions save-named-state and load-named-state to save/ restore an edit session.
#include "slick.sh"
#pragma option(strictsemicolons,on)
#pragma option(strict,on)
#pragma option(autodecl,off)
#pragma option(strictparens,on)
static int GetEditorCtlWid(int wid)
{
int editorctl_wid = wid._MDIGetActiveMDIChild();
if ( editorctl_wid != null && _iswindow_valid(editorctl_wid) && editorctl_wid._isEditorCtl()) {
return editorctl_wid;
}
if (_no_child_windows())
return -1;
return _mdi.p_child;
}
struct x1 {
int wid;
_str buf_name;
int xp_line;
int xp_col;
};
static x1 win_list[];
_command void save_win_list()
{
int mx = 16;
int wid1 = p_window_id;
x1 xx1;
int nxw;
win_list._makeempty();
int first = GetEditorCtlWid(p_window_id);
if ( first <= 0 ) {
p_window_id = wid1;
p_window_id._set_focus();
return;
}
p_window_id = first;
while ( --mx ) {
if ( !_iswindow_valid(p_window_id) || !p_window_id._isEditorCtl() ) {
//say('vvv');
p_window_id = wid1;
p_window_id._set_focus();
return;
}
p_window_id._set_focus();
xx1.wid = p_window_id;
xx1.buf_name = p_buf_name;
xx1.xp_line = p_line;
xx1.xp_col = p_col;
win_list[win_list._length()] = xx1;
//say(mx :+ ' z ' :+ p_buf_name :+ ' ' :+ win_list._length());
next_tab_group();
nxw = GetEditorCtlWid(p_window_id);
if ( nxw <= 0 ) {
p_window_id = wid1;
p_window_id._set_focus();
return;
}
p_window_id = nxw;
if ( p_window_id == first ) {
//say(mx :+ ' ' :+ p_buf_name);
p_window_id = wid1;
p_window_id._set_focus();
return;
}
}
p_window_id = wid1;
p_window_id._set_focus();
}
_command void restore_win_list()
{
int wid1 = p_window_id;
int kk;
if ( win_list._length() == 0 ) {
//say('yyy');
return;
}
for ( kk = 0; kk < win_list._length(); ++kk ) {
if ( !_iswindow_valid(win_list[kk].wid) || !win_list[kk].wid._isEditorCtl() ) {
return;
}
//say('rrr' :+ ' ' :+ win_list[kk].buf_name);
p_window_id = win_list[kk].wid;
p_window_id._set_focus();
edit(win_list[kk].buf_name);
p_line = win_list[kk].xp_line;
p_col = win_list[kk].xp_col;
center_line();
}
p_window_id = win_list[0].wid;
edit(win_list[0].buf_name);
}