pretty: support truncating in %>, %< and %><
%>(N,trunc) truncates the right part after N columns and replace the last two letters with "..". ltrunc does the same on the left. mtrunc cuts the middle out. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a57523428b
commit
a7f01c6b4d
2
utf8.h
2
utf8.h
@ -15,6 +15,8 @@ void strbuf_add_wrapped_text(struct strbuf *buf,
|
||||
const char *text, int indent, int indent2, int width);
|
||||
void strbuf_add_wrapped_bytes(struct strbuf *buf, const char *data, int len,
|
||||
int indent, int indent2, int width);
|
||||
void strbuf_utf8_replace(struct strbuf *sb, int pos, int width,
|
||||
const char *subst);
|
||||
|
||||
#ifndef NO_ICONV
|
||||
char *reencode_string_iconv(const char *in, size_t insz,
|
||||
|
Reference in New Issue
Block a user