Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: scroll position obeying buffer searching (closes #76) #393

Merged
merged 1 commit into from Jul 26, 2015

Conversation

Projects
None yet
3 participants
@sim642
Copy link
Contributor

commented Apr 11, 2015

This is my attempt on making buffer searching more intuitive by fixing the problems of #76.

Adds search_text_here and search_stop_here actions for /input to not change old behavior but makes them the new defaults. Adds ctrl-Q for old search stop behavior.

@@ -178,6 +178,7 @@ struct t_gui_buffer
regex_t *text_search_regex_compiled; /* regex used to search */
int text_search_where; /* search where? prefix and/or msg */
int text_search_found; /* 1 if text found, otherwise 0 */
struct t_gui_line *text_search_start_line; /* starting line for search */

This comment has been minimized.

Copy link
@flashcode

flashcode Apr 12, 2015

Member

This variable must be moved in struct t_gui_window_scroll (in gui-window.h), because you can perform different search in the same buffer, if it is displayed in multiple windows at same time; that's why it must be stored in the window (with other scroll variables).
And if possible, please rebase all your commits into a single one, thanks!

@@ -4421,6 +4427,7 @@ gui_buffer_print_log ()
log_printf (" text_search_regex_compiled: 0x%lx", ptr_buffer->text_search_regex_compiled);
log_printf (" text_search_where . . . : %d", ptr_buffer->text_search_where);
log_printf (" text_search_found . . . : %d", ptr_buffer->text_search_found);
log_printf (" text_search_start_line: 0x%lx", ptr_buffer->text_search_start_line);

This comment has been minimized.

Copy link
@flashcode

flashcode Apr 12, 2015

Member

Please align the value with other variables above and below (anyway, this variable will move to gui-window.c).

@sim642 sim642 force-pushed the sim642:input-search-here branch from 837e098 to b87c522 Apr 12, 2015

@flashcode flashcode self-assigned this May 1, 2015

@flashcode flashcode added this to the 1.3 milestone May 1, 2015

@KamranMackey

This comment has been minimized.

Copy link
Contributor

commented Jun 22, 2015

@sim642 yo, you have a few merge conflicts. you should fix them. :D

@sim642

This comment has been minimized.

Copy link
Contributor Author

commented Jun 23, 2015

@KamranMackey The conflict has appeared well after my PR and it's in the hook_command call of input in a width-formatted list of possible actions. Due to the nature of that section of code, there's no nice way for git to handle it and no point in me trying to keep my PR mergeable as any change in there would completely conflict again. It's better fixed at the point of final merge.

@flashcode flashcode merged commit b87c522 into weechat:master Jul 26, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

flashcode added a commit that referenced this pull request Jul 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.