popup: show the candidate page

This commit is contained in:
2026-08-14 20:06:53 +09:00
parent 193ed009bd
commit e4fc327ffd
9 changed files with 110 additions and 7 deletions

View File

@@ -1,6 +1,18 @@
#include "dat.h"
#include "fn.h"
int
pagemarker(char *buf, int nbuf, int first, int shown, int total)
{
if(nbuf <= 0)
return 0;
buf[0] = 0;
if(total <= Maxdisp || shown <= 0)
return 0;
return snprint(buf, nbuf, "%d-%d/%d", first + 1,
first + shown, total);
}
void
popupposition(Caret *caret, int pointerx, int pointery, int screenw,
int screenh, int w, int h, int *x, int *y)