]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/trace/lib_traceatr.c
ncurses 6.3 - patch 20220612
[ncurses.git] / ncurses / trace / lib_traceatr.c
index 9402627505084d6a07163414c53cef8864272cc5..d397fb21c66fa6745bdf76c3c1fcfe7f3fe452bd 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 2018-2020,2022 Thomas E. Dickey                                *
  * Copyright 1998-2017,2018 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -44,7 +44,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_traceatr.c,v 1.94 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: lib_traceatr.c,v 1.95 2022/06/11 22:40:56 tom Exp $")
 
 #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
 
@@ -369,14 +369,15 @@ _tracecchar_t2(int bufnum, const cchar_t *ch)
                                    _nc_wacs_width(ch->chars[PUTC_i]),
                                    (unsigned long) ch->chars[PUTC_i]);
                        (void) _nc_trace_bufcat(bufnum, temp);
-                       break;
-                   }
-                   for (n = 0; n < PUTC_n; n++) {
-                       if (n)
-                           (void) _nc_trace_bufcat(bufnum, ", ");
-                       (void) _nc_trace_bufcat(bufnum,
-                                               _nc_tracechar(CURRENT_SCREEN,
-                                                             UChar(PUTC_buf[n])));
+                       attr &= ~A_CHARTEXT;    /* ignore WidecExt(ch) */
+                   } else {
+                       for (n = 0; n < PUTC_n; n++) {
+                           if (n)
+                               (void) _nc_trace_bufcat(bufnum, ", ");
+                           (void) _nc_trace_bufcat(bufnum,
+                                                   _nc_tracechar(CURRENT_SCREEN,
+                                                                 UChar(PUTC_buf[n])));
+                       }
                    }
                }
                (void) _nc_trace_bufcat(bufnum, " }");