mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
go home
This commit is contained in:
parent
39b327825b
commit
279787d2fc
@ -269,13 +269,15 @@ book_mark_collapse_insert (GList *list, const int start_line, const int end_line
|
|||||||
|
|
||||||
int sl = 0;
|
int sl = 0;
|
||||||
int el = 0;
|
int el = 0;
|
||||||
|
mc_log("book_mark_collapse_insert \n");
|
||||||
|
|
||||||
while (link) {
|
while ( link ) {
|
||||||
newlink = g_list_previous (link);
|
newlink = g_list_previous (link);
|
||||||
q = (struct collapsed_lines *) link->data;
|
q = (struct collapsed_lines *) link->data;
|
||||||
sl = q->start_line;
|
sl = q->start_line;
|
||||||
el = q->end_line;
|
el = q->end_line;
|
||||||
if (((sl == start_line) || (el == end_line) ||
|
mc_log("link\n");
|
||||||
|
/*if (((sl == start_line) || (el == end_line) ||
|
||||||
(sl == end_line) || (el == start_line)) ||
|
(sl == end_line) || (el == start_line)) ||
|
||||||
((sl < start_line) && (el > start_line) && (el < end_line)) ||
|
((sl < start_line) && (el > start_line) && (el < end_line)) ||
|
||||||
((sl > start_line) && (sl < end_line) && (el > end_line))) {
|
((sl > start_line) && (sl < end_line) && (el > end_line))) {
|
||||||
@ -283,6 +285,7 @@ book_mark_collapse_insert (GList *list, const int start_line, const int end_line
|
|||||||
tmp = g_list_remove_link (list, link);
|
tmp = g_list_remove_link (list, link);
|
||||||
g_list_free_1 (link);
|
g_list_free_1 (link);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
link = newlink;
|
link = newlink;
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
@ -325,8 +328,8 @@ int book_mark_get_collapse_state (GList * list, const int line)
|
|||||||
int state;
|
int state;
|
||||||
int c = 0;
|
int c = 0;
|
||||||
|
|
||||||
// mc_log("start_line: %ld, end_line: %ld, line: %ld [%i]\n", start_line, end_line, line, c);
|
|
||||||
c = book_mark_collapse_query (list, line, &start_line, &end_line, &state);
|
c = book_mark_collapse_query (list, line, &start_line, &end_line, &state);
|
||||||
|
mc_log("start_line: %ld, end_line: %ld, line: %ld [%i]\n", start_line, end_line, line, c);
|
||||||
if ( c == 0 )
|
if ( c == 0 )
|
||||||
return C_LINES_DEFAULT;
|
return C_LINES_DEFAULT;
|
||||||
if ( line == start_line ) {
|
if ( line == start_line ) {
|
||||||
|
@ -2689,7 +2689,7 @@ edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
|
|||||||
}
|
}
|
||||||
unsigned int end_line = start_line + lines_selected;
|
unsigned int end_line = start_line + lines_selected;
|
||||||
mc_log("lines_selected:%ld\n", lines_selected);
|
mc_log("lines_selected:%ld\n", lines_selected);
|
||||||
book_mark_collapse_insert (edit->collapsed, start_line, end_line, 1);
|
edit->collapsed = book_mark_collapse_insert (edit->collapsed, start_line, end_line, 1);
|
||||||
}
|
}
|
||||||
edit->force |= REDRAW_PAGE;
|
edit->force |= REDRAW_PAGE;
|
||||||
break;
|
break;
|
||||||
|
@ -383,7 +383,7 @@ edit_draw_this_line (WEdit *edit, long b, long row, long start_col,
|
|||||||
line_stat[0] = '|';
|
line_stat[0] = '|';
|
||||||
break;
|
break;
|
||||||
case C_LINES_LAST:
|
case C_LINES_LAST:
|
||||||
line_stat[0] = '\\';
|
line_stat[0] = '_';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -614,7 +614,7 @@ render_edit_text (WEdit * edit, long start_row, long start_column, long end_row,
|
|||||||
goto exit_render;
|
goto exit_render;
|
||||||
cur_line = edit->start_line + row;
|
cur_line = edit->start_line + row;
|
||||||
mc_log("REDRAW_PAGE cur_line:%i\n", cur_line);
|
mc_log("REDRAW_PAGE cur_line:%i\n", cur_line);
|
||||||
collapse_state = book_mark_get_collapse_state(edit, cur_line);
|
collapse_state = book_mark_get_collapse_state(edit->collapsed, cur_line);
|
||||||
if ( collapse_state != C_LINES_MIDDLE_C ) {
|
if ( collapse_state != C_LINES_MIDDLE_C ) {
|
||||||
edit_draw_this_line (edit, b, row, start_column, end_column, collapse_state);
|
edit_draw_this_line (edit, b, row, start_column, end_column, collapse_state);
|
||||||
}
|
}
|
||||||
@ -633,7 +633,7 @@ render_edit_text (WEdit * edit, long start_row, long start_column, long end_row,
|
|||||||
if (key_pending (edit))
|
if (key_pending (edit))
|
||||||
goto exit_render;
|
goto exit_render;
|
||||||
cur_line = edit->start_line + row;
|
cur_line = edit->start_line + row;
|
||||||
collapse_state = book_mark_get_collapse_state(edit, cur_line);
|
collapse_state = book_mark_get_collapse_state(edit->collapsed, cur_line);
|
||||||
if ( collapse_state != C_LINES_MIDDLE_C ) {
|
if ( collapse_state != C_LINES_MIDDLE_C ) {
|
||||||
edit_draw_this_line (edit, b, row, start_column, end_column,
|
edit_draw_this_line (edit, b, row, start_column, end_column,
|
||||||
collapse_state);
|
collapse_state);
|
||||||
@ -649,7 +649,7 @@ render_edit_text (WEdit * edit, long start_row, long start_column, long end_row,
|
|||||||
if (key_pending (edit))
|
if (key_pending (edit))
|
||||||
goto exit_render;
|
goto exit_render;
|
||||||
cur_line = edit->start_line + curs_row;
|
cur_line = edit->start_line + curs_row;
|
||||||
collapse_state = book_mark_get_collapse_state(edit, cur_line);
|
collapse_state = book_mark_get_collapse_state(edit->collapsed, cur_line);
|
||||||
if ( collapse_state != C_LINES_MIDDLE_C ) {
|
if ( collapse_state != C_LINES_MIDDLE_C ) {
|
||||||
edit_draw_this_line (edit, b, curs_row, start_column, end_column,
|
edit_draw_this_line (edit, b, curs_row, start_column, end_column,
|
||||||
collapse_state);
|
collapse_state);
|
||||||
@ -663,7 +663,7 @@ render_edit_text (WEdit * edit, long start_row, long start_column, long end_row,
|
|||||||
if (key_pending (edit))
|
if (key_pending (edit))
|
||||||
goto exit_render;
|
goto exit_render;
|
||||||
cur_line = edit->start_line + row;
|
cur_line = edit->start_line + row;
|
||||||
collapse_state = book_mark_get_collapse_state(edit, cur_line);
|
collapse_state = book_mark_get_collapse_state(edit->collapsed, cur_line);
|
||||||
if ( collapse_state != C_LINES_MIDDLE_C ) {
|
if ( collapse_state != C_LINES_MIDDLE_C ) {
|
||||||
edit_draw_this_line (edit, b, row, start_column, end_column, collapse_state);
|
edit_draw_this_line (edit, b, row, start_column, end_column, collapse_state);
|
||||||
}
|
}
|
||||||
@ -679,7 +679,7 @@ render_edit_text (WEdit * edit, long start_row, long start_column, long end_row,
|
|||||||
if (key_pending (edit))
|
if (key_pending (edit))
|
||||||
goto exit_render;
|
goto exit_render;
|
||||||
cur_line = edit->start_line + row;
|
cur_line = edit->start_line + row;
|
||||||
collapse_state = book_mark_get_collapse_state(edit, cur_line);
|
collapse_state = book_mark_get_collapse_state(edit->collapsed, cur_line);
|
||||||
if ( collapse_state != C_LINES_MIDDLE_C ) {
|
if ( collapse_state != C_LINES_MIDDLE_C ) {
|
||||||
edit_draw_this_line (edit, b, row, start_column, end_column, collapse_state);
|
edit_draw_this_line (edit, b, row, start_column, end_column, collapse_state);
|
||||||
}
|
}
|
||||||
@ -693,7 +693,7 @@ render_edit_text (WEdit * edit, long start_row, long start_column, long end_row,
|
|||||||
if (key_pending (edit))
|
if (key_pending (edit))
|
||||||
goto exit_render;
|
goto exit_render;
|
||||||
cur_line = edit->start_line + row;
|
cur_line = edit->start_line + row;
|
||||||
collapse_state = book_mark_get_collapse_state(edit, cur_line);
|
collapse_state = book_mark_get_collapse_state(edit->collapsed, cur_line);
|
||||||
if ( collapse_state != C_LINES_MIDDLE_C ) {
|
if ( collapse_state != C_LINES_MIDDLE_C ) {
|
||||||
edit_draw_this_line (edit, b, row, start_column, end_column, collapse_state);
|
edit_draw_this_line (edit, b, row, start_column, end_column, collapse_state);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user