minor vertical alignment fixes
This commit is contained in:
parent
d6555f6f0f
commit
8549ed19db
20
include/hl.h
20
include/hl.h
@ -69,7 +69,7 @@ extern token_t * new_keyword_token(const char * const word,
|
|||||||
hl_group_t * const g);
|
hl_group_t * const g);
|
||||||
|
|
||||||
extern int new_keyword_tokens(const char * const * words,
|
extern int new_keyword_tokens(const char * const * words,
|
||||||
hl_group_t * const g);
|
hl_group_t * const g);
|
||||||
|
|
||||||
extern token_t * new_token(const char * const word,
|
extern token_t * new_token(const char * const word,
|
||||||
const token_type_t t,
|
const token_type_t t,
|
||||||
@ -77,14 +77,14 @@ extern token_t * new_token(const char * const word,
|
|||||||
|
|
||||||
// TODO: ALIGN PROPERLY...
|
// TODO: ALIGN PROPERLY...
|
||||||
|
|
||||||
extern int token_fits(const token_t * const token,
|
extern int token_fits(const token_t * const token,
|
||||||
const char * const to,
|
const char * const to,
|
||||||
const int string_offset,
|
const int string_offset,
|
||||||
const bool is_start_of_line,
|
const bool is_start_of_line,
|
||||||
int * match_offset);
|
int * match_offset);
|
||||||
|
|
||||||
extern void render_string(const char * const string,
|
extern void render_string(const char * const string,
|
||||||
const char * const mode);
|
const char * const mode);
|
||||||
|
|
||||||
extern int hl_init(void);
|
extern int hl_init(void);
|
||||||
extern int hl_deinit(void);
|
extern int hl_deinit(void);
|
||||||
@ -254,14 +254,16 @@ token_t * new_token(const char * const word,
|
|||||||
// ### Highlighting ###
|
// ### Highlighting ###
|
||||||
// --------------------
|
// --------------------
|
||||||
|
|
||||||
|
// XXX: meditate on this shit
|
||||||
int token_fits(const token_t * const token,
|
int token_fits(const token_t * const token,
|
||||||
const char * const to,
|
const char * const to,
|
||||||
const int string_offset,
|
const int string_offset,
|
||||||
const bool is_start_of_line,
|
const bool is_start_of_line,
|
||||||
int * match_offset) {
|
int * match_offset) { // XXX: rm this
|
||||||
UNUSED(match_offset);
|
UNUSED(match_offset);
|
||||||
//return regex_match(pattern, to, string_offset, match_offset);
|
//return regex_match(pattern, to, string_offset, match_offset);
|
||||||
return regex_match(token->syntax, to, is_start_of_line, string_offset);
|
match_t * m = regex_match(token->syntax, to, is_start_of_line, string_offset);
|
||||||
|
return (m ? m->width : 0);// XXX: nigger leaks
|
||||||
}
|
}
|
||||||
|
|
||||||
void render_string(const char * const string,
|
void render_string(const char * const string,
|
||||||
|
Loading…
Reference in New Issue
Block a user