comparison mcabber/mcabber/hbuf.c @ 1961:39021fd6b0e1

Try to improve readmarks in some cases This patch removes the readmark when entering chatmode if the mark is on the last line. This should hopefully fix weird behavior seen under some circumstances.
author Mikael Berthe <mikael@lilotux.net>
date Tue, 15 Mar 2011 00:39:17 +0100
parents f309f343070c
children ec737f5f1d6f
comparison
equal deleted inserted replaced
1960:b596bcff758e 1961:39021fd6b0e1
552 break; 552 break;
553 } 553 }
554 } 554 }
555 } 555 }
556 556
557 // hbuf_remove_trailing_readmark(hbuf)
558 // Unset the buffer readmark if it is on the last line
559 void hbuf_remove_trailing_readmark(GList *hbuf)
560 {
561 hbuf_block *blk;
562
563 if (!hbuf) return;
564
565 hbuf = g_list_last(hbuf);
566 blk = (hbuf_block*)(hbuf->data);
567 blk->prefix.flags &= ~HBB_PREFIX_READMARK;
568 }
569
557 // hbuf_get_blocks_number() 570 // hbuf_get_blocks_number()
558 // Returns the number of allocated hbuf_block's. 571 // Returns the number of allocated hbuf_block's.
559 guint hbuf_get_blocks_number(GList *hbuf) 572 guint hbuf_get_blocks_number(GList *hbuf)
560 { 573 {
561 hbuf_block *hbuf_b_elt; 574 hbuf_block *hbuf_b_elt;