commit - 23ca9d13ca4a4a1ef66bd6fa717bef548dbe8fba
commit + 0aef305d12c879faacb155c7b7348e6dcd99f394
blob - f9f37a87eedaff718d71a10e8a2233e0938f5bd2
blob + 605bcc2a5b658a91ad2bc6feaf3eb77d3638f65c
--- defaults.c
+++ defaults.c
int olivetti_mode = 1;
int set_title = 1;
int tab_bar_show = 1;
+
+static struct line fringe_line = {
+ .type = LINE_FRINGE,
+};
+struct vline fringe = {
+ /*
+ * This is a special vline, it won't ever be free'd, as it's
+ * only "virtual" for the UI, it's never added to a buffer.
+ */
+ .line = (char *)"",
+ .parent = &fringe_line,
+};
struct lineprefix line_prefixes[] = {
[LINE_TEXT] = { "", "" },
[LINE_DOWNLOAD] = {" Fetching ", " "},
[LINE_DOWNLOAD_DONE] = {" Done ", " "},
[LINE_DOWNLOAD_INFO] = {" ", " "},
+
+ [LINE_FRINGE] = {"", ""},
};
struct line_face line_faces[] = {
.pair = PDOWNLOAD_INFO,
.trail_pair = PDOWNLOAD_INFO_TRAIL
},
+
+ /* misc ui */
+ [LINE_FRINGE] = {
+ .prfx_pair = PFRINGE,
+ .pair = PFRINGE,
+ .trail_pair = PFRINGE_TRAIL,
+ }
};
struct tab_face tab_face = {
{"download.ongoing", LINE_DOWNLOAD},
{"download.done", LINE_DOWNLOAD_DONE},
{"download.info", LINE_DOWNLOAD_INFO},
+
+ /* misc ui */
+ {"fringe", LINE_FRINGE},
};
static struct mapping *
blob - 177c8b83606b33ad09561dae2b66e7d0413a05db
blob + 8c8b3a8b7db06d3abba3a4cfb0d159db40c990cc
--- defaults.h
+++ defaults.h
extern int set_title;
extern int tab_bar_show;
+extern struct vline fringe;
+
struct lineprefix {
const char *prfx1;
const char *prfx2;
blob - 464645a0f4b4328d77b50d86c75c04e5a4a6dff8
blob + 5facedbac001028d9b4a2f887d3d3b715606ffe2
--- telescope.h
+++ telescope.h
LINE_DOWNLOAD,
LINE_DOWNLOAD_DONE,
LINE_DOWNLOAD_INFO,
+
+ /* misc ui */
+ LINE_FRINGE,
};
/* for lines: mark as hidden */
blob - 59bc25a054e90eb846d92fee014ba499b23e28d0
blob + a4803f9231ebca27a7e363810dc46e96ce477d45
--- ui.c
+++ ui.c
static void line_prefix_and_text(struct vline *, char *, size_t, const char **, const char **);
static void print_vline(int, int, WINDOW*, struct vline*);
static void redraw_tabline(void);
-static void redraw_window(WINDOW*, int, int, int, struct buffer*);
+static void redraw_window(WINDOW *, int, int, int, int, struct buffer *);
static void redraw_download(void);
static void redraw_help(void);
static void redraw_body(struct tab*);
static void
redraw_window(WINDOW *win, int off, int height, int width,
- struct buffer *buffer)
+ int show_fringe, struct buffer *buffer)
{
struct vline *vl;
- int l, onscreen;
+ int onscreen = 0, l = 0;
restore_curs_x(buffer);
buffer->current_line = adjust_line(buffer->current_line, buffer);
- l = 0;
- onscreen = 0;
for (vl = buffer->top_line; vl != NULL; vl = TAILQ_NEXT(vl, vlines)) {
if (vl->parent->flags & L_HIDDEN)
continue;
buffer->last_line_off = buffer->line_off;
buffer->force_redraw = 0;
end:
+ for (; show_fringe && l < height; l++)
+ print_vline(0, width, win, &fringe);
+
wmove(win, buffer->curs_y, buffer->curs_x);
}
static void
redraw_download(void)
{
- redraw_window(download, 0, download_lines, COLS, &downloadwin);
+ redraw_window(download, 0, download_lines, COLS, 0, &downloadwin);
}
static void
redraw_help(void)
{
- redraw_window(help, 0, help_lines, help_cols, &helpwin);
+ redraw_window(help, 0, help_lines, help_cols, 1, &helpwin);
}
static void
tab->buffer.force_redraw =1;
last_tab = tab;
- redraw_window(body, x_offset, body_lines, body_cols, &tab->buffer);
+ redraw_window(body, x_offset, body_lines, body_cols, 1, &tab->buffer);
}
static inline char
static void
do_redraw_minibuffer_compl(void)
{
- redraw_window(minibuffer, 0, 10, COLS,
+ redraw_window(minibuffer, 0, 10, COLS, 1,
&ministate.compl.buffer);
}
blob - 91f25e72264b4b2b92e490dcce6e798344b7166e
blob + 00fe68291a346562f2e358b9eaef4fad166db13d
--- ui.h
+++ ui.h
PMODELINE,
PMINIBUF,
+
+ PFRINGE,
+ PFRINGE_TRAIL,
};
extern struct thiskey thiskey;
blob - 7cf9b8af5ba28dda0dbf628cf0c5cdc7a7491f40
blob + 338068315003a7f604337fc0f6c91a4b98a7739e
--- wrap.c
+++ wrap.c
case LINE_DOWNLOAD_INFO:
wrap_one(buffer, prfx, l, width);
break;
+ case LINE_FRINGE:
+ /* never, ever wrapped */
+ break;
}
if (top_orig == l && buffer->top_line == NULL) {