popup: keep only computed geometry in Popup; one fallback for slivers
numx, textx and selx were compile-time constants stored per layout; the number column starts at PopupPad and text at PopupPad+PopupNumw, which dat.h now says once. The height fallback tried dropping the marker, then the preedit, then the padding as three separate refits; below one padded row it now shows as many bare rows as fit, at least one, which is what those steps added up to.
This commit is contained in:
10
dat.h
10
dat.h
@@ -142,6 +142,11 @@ struct Drawcmd
|
||||
Caret caret;
|
||||
};
|
||||
|
||||
/*
|
||||
* Popup geometry from popuplayout: n rows from row0 of the candidates,
|
||||
* each Fontsz tall; a section's y is -1 when it is absent. Numbers
|
||||
* start at PopupPad, text at PopupPad+PopupNumw.
|
||||
*/
|
||||
typedef struct Popup Popup;
|
||||
struct Popup
|
||||
{
|
||||
@@ -152,14 +157,11 @@ struct Popup
|
||||
int prey;
|
||||
int sepy;
|
||||
int rowsy;
|
||||
int numx;
|
||||
int textx;
|
||||
int textw;
|
||||
int markx;
|
||||
int marky;
|
||||
int markx;
|
||||
int markw;
|
||||
Str mark;
|
||||
int selx;
|
||||
int sely;
|
||||
int selw;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user