#include "arg.h"
#include "st.h"
#include "win.h"
+#include "normalMode.h"
/* types used in config.h */
typedef struct {
free(xsel.clipboard);
xsel.clipboard = NULL;
+ xsetsel(getsel());
if (xsel.primary != NULL) {
xsel.clipboard = xstrdup(xsel.primary);
return XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor);
}
+void normalMode() { historyModeToggle((win.mode ^=MODE_NORMAL) & MODE_NORMAL); }
+
void
xloadcols(void)
{
for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) {
/* Fetch rune and mode for current glyph. */
- rune = glyphs[i].u;
- mode = glyphs[i].mode;
+ Glyph g = glyphs[i];
+ historyOverlay(x+i, y, &g);
+ rune = g.u;
+ mode = g.mode;
/* Skip dummy wide-character spacing. */
if (mode == ATTR_WDUMMY)
i = ox = 0;
for (x = x1; x < x2 && i < numspecs; x++) {
new = line[x];
+ historyOverlay(x, y1, &new);
if (new.mode == ATTR_WDUMMY)
continue;
if (selected(x, y1))
len = XmbLookupString(xw.ime.xic, e, buf, sizeof buf, &ksym, &status);
else
len = XLookupString(e, buf, sizeof buf, &ksym, NULL);
+ if (IS_SET(MODE_NORMAL)) {
+ if (kpressHist(buf, len, match(ControlMask, e->state), &ksym)
+ == finished) normalMode();
+ return;
+ }
/* 1. shortcuts */
for (bp = shortcuts; bp < shortcuts + LEN(shortcuts); bp++) {
if (ksym == bp->keysym && match(bp->mod, e->state)) {