fixed file region width wrapping bug

This commit is contained in:
Allen Webster 2016-05-23 07:37:12 -04:00
parent 0ae66f5cdd
commit 199c2a2fc0
3 changed files with 36 additions and 36 deletions

60
4ed.cpp
View File

@ -4078,34 +4078,34 @@ App_Step_Sig(app_step){
// NOTE(allen): initialize message // NOTE(allen): initialize message
if (first_step){ if (first_step){
String welcome = make_lit_string( String welcome =
"Welcome to " VERSION "\n" make_lit_string("Welcome to " VERSION "\n"
"If you're new to 4coder there's no tutorial yet :(\n" "If you're new to 4coder there's no tutorial yet :(\n"
"you can use the key combo control + o to look for a file\n" "you can use the key combo control + o to look for a file\n"
"and if you load README.txt you'll find all the key combos there are.\n" "and if you load README.txt you'll find all the key combos there are.\n"
"\n" "\n"
"Newest features:\n" "Newest features:\n"
"-Tied the view scrolling and the list arrow navigation together\n" "-Tied the view scrolling and the list arrow navigation together\n"
"-Scroll bars are now toggleable with ALT-s for show and ALT-w for hide\n" "-Scroll bars are now toggleable with ALT-s for show and ALT-w for hide\n"
"\n" "\n"
"New in alpha 4.0.5:" "New in alpha 4.0.5:\n"
"-New indent rule\n" "-New indent rule\n"
"-app->buffer_compute_cursor in the customization API\n" "-app->buffer_compute_cursor in the customization API\n"
"-f keys are available\n" "-f keys are available\n"
"\n" "\n"
"New in alpha 4.0.3 and 4.0.4:\n" "New in alpha 4.0.3 and 4.0.4:\n"
"-Scroll bar on files and file lists\n" "-Scroll bar on files and file lists\n"
"-Arrow navigation in lists\n" "-Arrow navigation in lists\n"
"-A new minimal theme editor\n" "-A new minimal theme editor\n"
"\n" "\n"
"New in alpha 4.0.2:\n" "New in alpha 4.0.2:\n"
"-The file count limit is over 8 million now\n" "-The file count limit is over 8 million now\n"
"-File equality is handled better so renamings (such as 'subst') are safe now\n" "-File equality is handled better so renamings (such as 'subst') are safe now\n"
"-This buffer will report events including errors that happen in 4coder\n" "-This buffer will report events including errors that happen in 4coder\n"
"-Super users can post their own messages here with app->print_message\n" "-Super users can post their own messages here with app->print_message\n"
"-<ctrl e> centers view on cursor; cmdid_center_view in customization API\n" "-<ctrl e> centers view on cursor; cmdid_center_view in customization API\n"
"-Set font size on command line with -f N, N = 16 by default\n\n" "-Set font size on command line with -f N, N = 16 by default\n\n"
); );
do_feedback_message(system, models, welcome); do_feedback_message(system, models, welcome);
} }
@ -4574,9 +4574,9 @@ App_Step_Sig(app_step){
gui_post_scroll_vars(&view->gui_target, view->current_scroll); gui_post_scroll_vars(&view->gui_target, view->current_scroll);
break; break;
} }
}
view_record_prev_cursor(view); view_record_prev_cursor(view);
}
} }
// NOTE(allen): send style change messages if the style has changed // NOTE(allen): send style change messages if the style has changed

View File

@ -4217,7 +4217,7 @@ do_input_file_view(System_Functions *system, Exchange *exchange,
gui_session.rect.y0); gui_session.rect.y0);
f32 new_max_y = view_compute_max_target_y(view); f32 new_max_y = view_compute_max_target_y(view);
view->file_region = view->scroll_region; view->file_region = gui_session.rect;
view->gui_target.scroll_updated.min_y = new_min_y; view->gui_target.scroll_updated.min_y = new_min_y;
view->gui_target.scroll_updated.max_y = new_max_y; view->gui_target.scroll_updated.max_y = new_max_y;