From a7f01c6b4ddf9f2f6bdcb23fc7afb56695807cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Fri, 19 Apr 2013 09:08:51 +1000 Subject: pretty: support truncating in %>, %< and %>< MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit %>(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 Signed-off-by: Junio C Hamano --- utf8.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utf8.h') diff --git a/utf8.h b/utf8.h index a43ef9ae74..edde8ee189 100644 --- a/utf8.h +++ b/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, -- cgit v1.2.3