## STAGING
-* tide: implement hold mode and tag to enable/disable autoscroll
* tide: point should be added to editlog to ensure undo/redo behave appropriately
* tide: tab in point does fcomplete maybe?
* fetch: don't exit on rulesets with no launch or exec rules
bool xpty_active(void);
+void xpty_togglescroll(void);
int xpty_run(View* view, char** cmd);
void xpty_send(char* cmd);
void xpty_rawsend(char* cmd);
static View* EditView = NULL;
static int Pty_Fd = -1;
+static bool DoScroll = 1;
static char ReadBuf[BUFFERSZ+1] = {0};
static char ArgsBuf[BUFFERSZ+1] = {0};
static char InputBuf[BUFFERSZ+1] = {0};
Handlers[State](buf[i]);
}
view_putraw(EditView, InputBuf);
- EditView->sync_flags |= CURSOR;
+ if (DoScroll)
+ {
+ EditView->sync_flags |= CURSOR;
+ }
}
static void xpty_read(Job* job)
return (Pty_Fd >= 0);
}
+void xpty_togglescroll(void)
+{
+ DoScroll = !DoScroll;
+}
+
int xpty_run(View* view, char** cmd)
{
(void)view;
view_paste(win_view(TAGS), buf);
}
+static void do_scroll(char* arg)
+{
+ (void)arg;
+ xpty_togglescroll();
+}
+
/* Main Routine
******************************************************************************/
Tag* Builtins = (Tag[]){
{ .tag = "Font", .action = win_font },
{ .tag = "Kill", .action = tag_kill },
{ .tag = "Line", .action = tag_line },
+ { .tag = "Scroll", .action = do_scroll },
{ .tag = NULL, .action = NULL }
};