summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormongo <mongo@iomega>2016-04-15 16:18:34 -0300
committermongo <mongo@iomega>2016-04-15 16:18:34 -0300
commitc0a088d7a4bc61e6e69fa5bd8964c39f68507c71 (patch)
tree7c0e0bd81b9868ae507db14234806b8bafd70a60
parent34ccd52a86982b600c927afbbead2fc7c5d8cf5c (diff)
Pf copies blank ucolor to new ent
-rwxr-xr-xsrc.scim2/cmds.c36
-rwxr-xr-xsrc.scim2/color.c2
-rwxr-xr-xsrc.scim2/main.c5
3 files changed, 21 insertions, 22 deletions
diff --git a/src.scim2/cmds.c b/src.scim2/cmds.c
index 3b46186..d40c044 100755
--- a/src.scim2/cmds.c
+++ b/src.scim2/cmds.c
@@ -184,14 +184,11 @@ void copyent(register struct ent *n, register struct ent *p, int dr, int dc,
}
//n->flags = may_sync;
-
if (special != 'f') {
- //if (special != 'm' || p->flags & is_valid) {
if (p->flags & is_valid) {
n->v = p->v;
n->flags |= p->flags & is_valid;
}
- //if (special != 'm' || p->expr) {
if (special != 'v' && p->expr) {
n->expr = copye(p->expr, dr, dc, r1, c1, r2, c2, special == 't');
if (p->flags & is_strexpr)
@@ -205,34 +202,33 @@ void copyent(register struct ent *n, register struct ent *p, int dr, int dc,
(void) strcpy(n->label, p->label);
n->flags &= ~is_leftflush;
n->flags |= ((p->flags & is_label) | (p->flags & is_leftflush));
- //} else if (special != 'm') {
- // n->label = NULL;
- // n->flags &= ~(is_label | is_leftflush);
}
n->flags |= p->flags & is_locked;
}
- //if (p->format) {
if (p->format && special != 'v') {
if (n->format) scxfree(n->format);
n->format = scxmalloc((unsigned) (strlen(p->format) + 1));
(void) strcpy(n->format, p->format);
- //} else if (special != 'm' && special != 'f')
} else if (special != 'v' && special != 'f')
n->format = NULL;
- if (special != 'v')
+ if (special != 'v') {
n->pad = p->pad;
-
- if (p->ucolor && special != 'v') {
- n->ucolor = (struct ucolor *) malloc (sizeof(struct ucolor));
- n->ucolor->fg = p->ucolor->fg;
- n->ucolor->bg = p->ucolor->bg;
- n->ucolor->bold = p->ucolor->bold;
- n->ucolor->dim = p->ucolor->dim;
- n->ucolor->reverse = p->ucolor->reverse;
- n->ucolor->standout = p->ucolor->standout;
- n->ucolor->underline = p->ucolor->underline;
- n->ucolor->blink = p->ucolor->blink;
+ if (n->ucolor) { // remove current cellcolor format in n ent
+ free(n->ucolor);
+ n->ucolor = NULL;
+ }
+ if (p->ucolor) { // copy new cellcolor format from p to n ent
+ n->ucolor = (struct ucolor *) malloc (sizeof(struct ucolor));
+ n->ucolor->fg = p->ucolor->fg;
+ n->ucolor->bg = p->ucolor->bg;
+ n->ucolor->bold = p->ucolor->bold;
+ n->ucolor->dim = p->ucolor->dim;
+ n->ucolor->reverse = p->ucolor->reverse;
+ n->ucolor->standout = p->ucolor->standout;
+ n->ucolor->underline = p->ucolor->underline;
+ n->ucolor->blink = p->ucolor->blink;
+ }
}
n->flags |= is_changed;
diff --git a/src.scim2/color.c b/src.scim2/color.c
index 5b69a97..d2d874c 100755
--- a/src.scim2/color.c
+++ b/src.scim2/color.c
@@ -40,7 +40,7 @@ void start_default_ucolors() {
//ucolors[ DEFAULT ].fg = WHITE;
//ucolors[ DEFAULT ].bg = BLACK;
ucolors[ HEADINGS ].fg = WHITE;
- ucolors[ HEADINGS ].bg = RED;
+ ucolors[ HEADINGS ].bg = BLUE;
ucolors[ WELCOME ].fg = CYAN;
ucolors[ WELCOME ].bg = BLACK;
ucolors[ CELL_SELECTION ].fg = BLUE; // cell selection in headings
diff --git a/src.scim2/main.c b/src.scim2/main.c
index 9f893c2..2f3cb11 100755
--- a/src.scim2/main.c
+++ b/src.scim2/main.c
@@ -385,7 +385,7 @@ void signals() {
void nopipe();
void winchg();
- //signal(SIGINT, sig_int);
+ signal(SIGINT, sig_int);
signal(SIGABRT, sig_abrt);
signal(SIGTERM, sig_term); // kill
signal(SIGPIPE, nopipe);
@@ -398,7 +398,10 @@ void signals() {
void sig_int() {
+ // REMOVED FOR MAKE DEBUGGING EASIER
sc_error("Got SIGINT. Press «:q<Enter>» to quit SC-IM");
+
+ //shall_quit = 2;
}