st-flexipatch

My st-flexipatch configuration
git clone git://git.ethandl.dev/st-flexipatch
Log | Files | Refs | README | LICENSE

reflow.h (1351B)


      1 #define TLINE(y) ( \
      2 	(y) < term.scr ? term.hist[(term.histi + (y) - term.scr + 1 + HISTSIZE) % HISTSIZE] \
      3 	               : term.line[(y) - term.scr] \
      4 )
      5 
      6 #define TLINEABS(y) ( \
      7 	(y) < 0 ? term.hist[(term.histi + (y) + 1 + HISTSIZE) % HISTSIZE] : term.line[(y)] \
      8 )
      9 
     10 #define UPDATEWRAPNEXT(alt, col) do { \
     11 	if ((term.c.state & CURSOR_WRAPNEXT) && term.c.x + term.wrapcwidth[alt] < col) { \
     12 		term.c.x += term.wrapcwidth[alt]; \
     13 		term.c.state &= ~CURSOR_WRAPNEXT; \
     14 	} \
     15 } while (0);
     16 
     17 static int tiswrapped(Line line);
     18 static size_t tgetline(char *, const Glyph *);
     19 static inline int regionselected(int, int, int, int);
     20 static void tloaddefscreen(int, int);
     21 static void tloadaltscreen(int, int);
     22 static void selmove(int);
     23 static inline void tclearglyph(Glyph *, int);
     24 static void treflow(int, int);
     25 static void rscrolldown(int);
     26 static void tresizedef(int, int);
     27 static void tresizealt(int, int);
     28 void kscrolldown(const Arg *);
     29 void kscrollup(const Arg *);
     30 static void tscrollup(int, int, int, int);
     31 static void tclearregion(int, int, int, int, int);
     32 static void tdeletechar(int);
     33 static int tlinelen(Line len);
     34 static char * tgetglyphs(char *buf, const Glyph *gp, const Glyph *lgp);
     35 static void selscroll(int, int, int);
     36 
     37 typedef struct {
     38 	 uint b;
     39 	 uint mask;
     40 	 void (*func)(const Arg *);
     41 	 const Arg arg;
     42 } MouseKey;
     43 
     44 extern MouseKey mkeys[];