From c71ed30cf0c554d288edfe87842082cc9ec393a7 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 28 Aug 2024 20:52:03 +0200 Subject: implemented Unicode support for rubin/rubout and a number of commands (WIP) (refs #5) certain test cases are still way too slow: 10000<@I/X^J/> 20000 or 10000<@I/X^J/> 20000<%a-1J> SCI_ALLOCATELINECHARACTERINDEX does not help much here. It probably speeds up only SCI_LINEFROMINDEXPOSITION and SCI_INDEXPOSITIONFROMLINE. --- src/error.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/error.h') diff --git a/src/error.h b/src/error.h index 45d084a..f60be1a 100644 --- a/src/error.h +++ b/src/error.h @@ -40,6 +40,7 @@ typedef enum { */ TECO_ERROR_SYNTAX, TECO_ERROR_ARGEXPECTED, + TECO_ERROR_CODEPOINT, TECO_ERROR_MOVE, TECO_ERROR_WORDS, TECO_ERROR_RANGE, @@ -73,6 +74,13 @@ teco_error_argexpected_set(GError **error, const gchar *cmd) "Argument expected for <%s>", cmd); } +static inline void +teco_error_codepoint_set(GError **error, const gchar *cmd) +{ + g_set_error(error, TECO_ERROR, TECO_ERROR_CODEPOINT, + "Invalid Unicode codepoint for <%s>", cmd); +} + static inline void teco_error_move_set(GError **error, const gchar *cmd) { -- cgit v1.2.3