browser.c (b746a1a2860f4a918f32d10dc569115d282aaf2f) browser.c (7efbcc8c075c5e9ef69b2379b75b58a699f23eb3)
1// SPDX-License-Identifier: GPL-2.0
2#include "../util/string2.h"
3#include "../util/config.h"
4#include "libslang.h"
5#include "ui.h"
6#include "util.h"
7#include <linux/compiler.h>
8#include <linux/list.h>

--- 743 unchanged lines hidden (view full) ---

752{
753 if (start > end)
754 __ui_browser__line_arrow_up(browser, column, start, end);
755 else
756 __ui_browser__line_arrow_down(browser, column, start, end);
757}
758
759void ui_browser__mark_fused(struct ui_browser *browser, unsigned int column,
1// SPDX-License-Identifier: GPL-2.0
2#include "../util/string2.h"
3#include "../util/config.h"
4#include "libslang.h"
5#include "ui.h"
6#include "util.h"
7#include <linux/compiler.h>
8#include <linux/list.h>

--- 743 unchanged lines hidden (view full) ---

752{
753 if (start > end)
754 __ui_browser__line_arrow_up(browser, column, start, end);
755 else
756 __ui_browser__line_arrow_down(browser, column, start, end);
757}
758
759void ui_browser__mark_fused(struct ui_browser *browser, unsigned int column,
760 unsigned int row, bool arrow_down)
760 unsigned int row, int diff, bool arrow_down)
761{
761{
762 unsigned int end_row;
762 int end_row;
763
763
764 if (row >= browser->top_idx)
765 end_row = row - browser->top_idx;
766 else
764 if (diff <= 0)
767 return;
768
769 SLsmg_set_char_set(1);
770
771 if (arrow_down) {
765 return;
766
767 SLsmg_set_char_set(1);
768
769 if (arrow_down) {
770 if (row + diff <= browser->top_idx)
771 return;
772
773 end_row = row + diff - browser->top_idx;
772 ui_browser__gotorc(browser, end_row, column - 1);
774 ui_browser__gotorc(browser, end_row, column - 1);
773 SLsmg_write_char(SLSMG_ULCORN_CHAR);
774 ui_browser__gotorc(browser, end_row, column);
775 SLsmg_draw_hline(2);
776 ui_browser__gotorc(browser, end_row + 1, column - 1);
777 SLsmg_write_char(SLSMG_LTEE_CHAR);
775 SLsmg_write_char(SLSMG_LTEE_CHAR);
776
777 while (--end_row >= 0 && end_row > (int)(row - browser->top_idx)) {
778 ui_browser__gotorc(browser, end_row, column - 1);
779 SLsmg_draw_vline(1);
780 }
781
782 end_row = (int)(row - browser->top_idx);
783 if (end_row >= 0) {
784 ui_browser__gotorc(browser, end_row, column - 1);
785 SLsmg_write_char(SLSMG_ULCORN_CHAR);
786 ui_browser__gotorc(browser, end_row, column);
787 SLsmg_draw_hline(2);
788 }
778 } else {
789 } else {
790 if (row < browser->top_idx)
791 return;
792
793 end_row = row - browser->top_idx;
779 ui_browser__gotorc(browser, end_row, column - 1);
780 SLsmg_write_char(SLSMG_LTEE_CHAR);
781 ui_browser__gotorc(browser, end_row, column);
782 SLsmg_draw_hline(2);
783 }
784
785 SLsmg_set_char_set(0);
786}

--- 12 unchanged lines hidden ---
794 ui_browser__gotorc(browser, end_row, column - 1);
795 SLsmg_write_char(SLSMG_LTEE_CHAR);
796 ui_browser__gotorc(browser, end_row, column);
797 SLsmg_draw_hline(2);
798 }
799
800 SLsmg_set_char_set(0);
801}

--- 12 unchanged lines hidden ---