[2666] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[barnowl/barnowl] 72f613: Make owl_fmtext_search take and return an offset

daemon@ATHENA.MIT.EDU (noreply@github.com)
Wed Sep 22 01:25:42 2010

Date: Tue, 21 Sep 2010 22:25:40 -0700
To: barnowl-dev@mit.edu
From: noreply@github.com

Branch: refs/heads/master
Home:   http://github.com/barnowl/barnowl

Commit: 72f613a9df56c738e6f4ed0262f43012450ffdcc
    http://github.com/barnowl/barnowl/commit/72f613a9df56c738e6f4ed0262f43012450ffdcc
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M fmtext.c
  M message.c

Log Message:
-----------
Make owl_fmtext_search take and return an offset


Commit: 449c6829fae14741905bf5508017fe5f865eeede
    http://github.com/barnowl/barnowl/commit/449c6829fae14741905bf5508017fe5f865eeede
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M fmtext.c
  M viewwin.c

Log Message:
-----------
Honor the do_search argument to _owl_fmtext_curs_waddstr

It hasn't done anything since 41c9a9675faf455c3c6adfbc629faf55ddbfe10f.
This also makes the viewwin explicitly request search highlighting,
to preserve old behavior.


Commit: 5b68c059f37025221b7dfcd2825c7708e7de7315
    http://github.com/barnowl/barnowl/commit/5b68c059f37025221b7dfcd2825c7708e7de7315
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M global.c
  M viewwin.c

Log Message:
-----------
Update the viewwin when the global search string changes

This will want to be made less hacky when we have some notification
mechanism for all of owl_global's properties. Also, use the new
owl_viewwin_dirty in internal functions to avoid dirtying a NULL window.


Commit: f7456bcc011467307df3a54316e06a60462ca066
    http://github.com/barnowl/barnowl/commit/f7456bcc011467307df3a54316e06a60462ca066
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M fmtext.c
  M tester.c

Log Message:
-----------
Add owl_fmtext_line_number and test.


Commit: dc9665a82b3d81062cd5686c159623b67ed33064
    http://github.com/barnowl/barnowl/commit/dc9665a82b3d81062cd5686c159623b67ed33064
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M tester.c

Log Message:
-----------
Add a test case for owl_fmtext_search


Commit: 6425d43b6ce537ee24ad2f8e4ab140d3998252f7
    http://github.com/barnowl/barnowl/commit/6425d43b6ce537ee24ad2f8e4ab140d3998252f7
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M popwin.c

Log Message:
-----------
Don't cause confusion if owl_popwin_up on an active popwin

Likewise, inactive popwins should not be closeable. The function returns
int, so we may as well return an error, but no one checks that.


Commit: 4cf7b1ba906e2b9d64025c6750d700a891d39a59
    http://github.com/barnowl/barnowl/commit/4cf7b1ba906e2b9d64025c6750d700a891d39a59
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M functions.c
  M popexec.c

Log Message:
-----------
If owl_popwin_up fails, abort the command


Commit: 7ba2ad41c061e0d45f81c6453fcff4a42da4f0d3
    http://github.com/barnowl/barnowl/commit/7ba2ad41c061e0d45f81c6453fcff4a42da4f0d3
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M fmtext.c
  M tester.c

Log Message:
-----------
Implement owl_fmtext_line_extents and add test case


Commit: b3b1b051937badd886da90647eade9934c74f17d
    http://github.com/barnowl/barnowl/commit/b3b1b051937badd886da90647eade9934c74f17d
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M owl.h
  M popwin.c

Log Message:
-----------
To be thorough, track all signal ids in the popwin

This isn't actually necessary here, but it's more correct. The
awkwardness suggests that we want the widgets to be GObjects so that
owl_signal_connect_object may do this automatically.


Commit: 03ca0054628460c6cc077c799c50e2dac636549a
    http://github.com/barnowl/barnowl/commit/03ca0054628460c6cc077c799c50e2dac636549a
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M functions.c
  M global.c
  M owl.h
  M popexec.c
  M popwin.c

Log Message:
-----------
Create a new owl_popwin every time instead of rewiring the old one

Constantly rewiring things is weird.


Commit: 61c1f1934d06ed9432e8476870774a778b74c1ab
    http://github.com/barnowl/barnowl/commit/61c1f1934d06ed9432e8476870774a778b74c1ab
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M viewwin.c

Log Message:
-----------
Don't export owl_viewwin_set_window.


Commit: 8ee712e00f681e910612f6f4eb7eabf7799ed2f7
    http://github.com/barnowl/barnowl/commit/8ee712e00f681e910612f6f4eb7eabf7799ed2f7
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M commands.c

Log Message:
-----------
Delete the popwin when closing it


Commit: 9eb38bb4825e0c7f73087fbd9f851aa0305ccedd
    http://github.com/barnowl/barnowl/commit/9eb38bb4825e0c7f73087fbd9f851aa0305ccedd
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M commands.c
  M functions.c
  M global.c
  M owl.h
  M popexec.c
  M viewwin.c

Log Message:
-----------
Likewise, don't reuse a global owl_viewwin

This means we don't have to support plugging and unplugging that thing
over and over. We also can almost entirely drop the global owl_viewwin.
Most of the code gets it from the context anyway.


Commit: d574d617b819f808dd6664880cb2cb5b4f938fa4
    http://github.com/barnowl/barnowl/commit/d574d617b819f808dd6664880cb2cb5b4f938fa4
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M viewwin.c

Log Message:
-----------
Add owl_viewwin_up and owl_viewwin_down

So we have one consistent place for the clipping logic. Also, take
BOTTOM_OFFSET into account in owl_viewwin_pageup.


Commit: fa23002e7855209011325bc7048296464ba3cfbf
    http://github.com/barnowl/barnowl/commit/fa23002e7855209011325bc7048296464ba3cfbf
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M viewwin.c

Log Message:
-----------
Never move the screen up when during an owl_viewwin_down

We already can get in such a state, and a searchable popwin will be even
easier. Mimic less's behavior here.


Commit: 911693637db913f54b0040239ea7ee12372f48b1
    http://github.com/barnowl/barnowl/commit/911693637db913f54b0040239ea7ee12372f48b1
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M viewwin.c

Log Message:
-----------
Draw ~s in empty viewwin lines, to mimic less


Commit: b8742baf23df00f2a66b1107f9879c4d0f4c2daa
    http://github.com/barnowl/barnowl/commit/b8742baf23df00f2a66b1107f9879c4d0f4c2daa
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M viewwin.c

Log Message:
-----------
Add half an implementation of owl_viewwin_search


Commit: 2640b63ad4a2927fb744a58ea641a02f7eabebd9
    http://github.com/barnowl/barnowl/commit/2640b63ad4a2927fb744a58ea641a02f7eabebd9
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M viewwin.c

Log Message:
-----------
Rearrange some viewwin functions

The two constructor should be together. Otherwise, it's a bit hard to
read.


Commit: 60c13866becd30f613756a81b8a09f6563e5bc02
    http://github.com/barnowl/barnowl/commit/60c13866becd30f613756a81b8a09f6563e5bc02
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M owl.h
  M viewwin.c

Log Message:
-----------
Split the viewwin's status bar into its own window


Commit: a8186dc2f9d480a4e1d37d5f680b1329b22d4ac8
    http://github.com/barnowl/barnowl/commit/a8186dc2f9d480a4e1d37d5f680b1329b22d4ac8
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M editwin.c

Log Message:
-----------
owl_editwin should own a reference to its window


Commit: 005eae51d5b78763a5e79804f049c50fcd982966
    http://github.com/barnowl/barnowl/commit/005eae51d5b78763a5e79804f049c50fcd982966
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M global.c

Log Message:
-----------
Make owl_global_get_typwin return the context's typwin

The only remaining callers are the perl glue and some functions in
keys.c. This makes that allo of that code independent of a global
editwin.


Commit: 818f19c647de5c3fdf58e43b27b2809ea5ea5607
    http://github.com/barnowl/barnowl/commit/818f19c647de5c3fdf58e43b27b2809ea5ea5607
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M global.c
  M keys.c
  M perlglue.xs

Log Message:
-----------
Rename owl_global_get_typwin to owl_global_current_typwin

The new name is more explicitly the currently active typwin.


Commit: 1d74663a8f09edbde3a64656674d1b32eefbb391
    http://github.com/barnowl/barnowl/commit/1d74663a8f09edbde3a64656674d1b32eefbb391
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M context.c
  M global.c
  M owl.h

Log Message:
-----------
Add deactivate and delete hooks for owl_context

Also make pushing and popping slightly more flexible.


Commit: cb815703a7908e1a1eb7879671b9e1e7471418ed
    http://github.com/barnowl/barnowl/commit/cb815703a7908e1a1eb7879671b9e1e7471418ed
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M context.c
  M global.c

Log Message:
-----------
Add a separate owl_context_new and remove owl_context_init

The latter is unused anyway.


Commit: 08263a83b527b79d1d3de9ad2b53b8ed371e5125
    http://github.com/barnowl/barnowl/commit/08263a83b527b79d1d3de9ad2b53b8ed371e5125
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M editwin.c
  M functions.c
  M global.c

Log Message:
-----------
Add owl_editwin_get_window

This removes the need for owl_global_get_typwin_window. The remaining
references within global.c may be accessed directly as its an internal
field anyway.


Commit: 9190285f93c4ca7b608d64d481c22c0f208b1bfa
    http://github.com/barnowl/barnowl/commit/9190285f93c4ca7b608d64d481c22c0f208b1bfa
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M commands.c
  M editwin.c
  M tester.c

Log Message:
-----------
Ref-count the editwin


Commit: c394de875d07ff70043da33e68597dbeeb261b7c
    http://github.com/barnowl/barnowl/commit/c394de875d07ff70043da33e68597dbeeb261b7c
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M Makefile.am
  M commands.c
  A editcontext.c
  M functions.c
  M global.c

Log Message:
-----------
Use ref-counting to make editwin ownership saner

When creating an editwin, one creates an editcontext which takes a
reference to the editwin. Likewise, the pointer in owl_global holds
reference. The reference counting manages their ownership claims. In
addition, owl_global_set_typwin_inactive now does release a reference.

Instead, the callback-calling commands take a reference and release it
later. We may wish to further improve that so that the contexts are also
ref-counted such that, when their commands are running, they will not be
deallocated, even if popped. That will avoid the callback dance.


Commit: fc5eef4eae8b2e66e6f0632256268557e8e4ef62
    http://github.com/barnowl/barnowl/commit/fc5eef4eae8b2e66e6f0632256268557e8e4ef62
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M commands.c
  M functions.c
  M global.c
  M owl.h

Log Message:
-----------
Configure owl_global_set_typwin_inactive to be called on context deactivate

This removes the explicit calls to the deactivate function. In
particular, it means that we can set up an alternate deactivate function
and edit:done needn't know about it.


Commit: 6a359386663d3a7edbd6be18500bdfe2f2a6a7d6
    http://github.com/barnowl/barnowl/commit/6a359386663d3a7edbd6be18500bdfe2f2a6a7d6
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M viewwin.c

Log Message:
-----------
Add an unspeakably ugly version of reverse search

I think we really want the viewwin to have pre-split the output into
lines.


Commit: 38e2250d6a6cd2691f017563d2eb56b3304d608a
    http://github.com/barnowl/barnowl/commit/38e2250d6a6cd2691f017563d2eb56b3304d608a
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M window.c
  M window.h

Log Message:
-----------
Use bool instead of int in owl_window


Commit: 5f0bcde5fca85d68f6ccb59a5179cacd724d2015
    http://github.com/barnowl/barnowl/commit/5f0bcde5fca85d68f6ccb59a5179cacd724d2015
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M window.c

Log Message:
-----------
Make the check for _owl_window_realize more readable


Commit: 4811422a1b7c4b9bb05f5da4dc8d64531b648b7b
    http://github.com/barnowl/barnowl/commit/4811422a1b7c4b9bb05f5da4dc8d64531b648b7b
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M window.c

Log Message:
-----------
Delay realizing a window until we need it for painting

This avoids WINDOW churn if we show and hide windows a lot.


Commit: 09ceee3c59c00cc668ef8173dd82d7c4a6254252
    http://github.com/barnowl/barnowl/commit/09ceee3c59c00cc668ef8173dd82d7c4a6254252
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M commands.c
  M keys.c
  M owl.h
  M viewwin.c

Log Message:
-----------
Add a command-line to the viewwin

It's triggered via popless:start-command.


Commit: 2ec737f116c7b4931d6151f4216f7e12fe71103e
    http://github.com/barnowl/barnowl/commit/2ec737f116c7b4931d6151f4216f7e12fe71103e
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M commands.c
  M functions.c
  M global.c

Log Message:
-----------
Add owl_function_set_search

Instead of allowing OWL_DIRECTION_NONE in owl_function_search_start,
make the setsearch command just call a more approriately named function.

Also, move the mainwin redisplay into owl_global_set_search_re.
Although, really it should just emit a signal.


Commit: a728387ed477a1b9c0f5af69c1ac7e78bc4bd9cd
    http://github.com/barnowl/barnowl/commit/a728387ed477a1b9c0f5af69c1ac7e78bc4bd9cd
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M commands.c
  M functions.c

Log Message:
-----------
Just remove owl_function_search_{start,continue} altogether

There's only one caller, and they're (now) tiny. We may as well just
inline them.


Commit: 9c1e61d4d6debfa83bb8f396cb94073613cf19d5
    http://github.com/barnowl/barnowl/commit/9c1e61d4d6debfa83bb8f396cb94073613cf19d5
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M commands.c
  M functions.c
  M owl.h
  M viewwin.c

Log Message:
-----------
Add OWL_SEARCH_CONTINUE and OWL_SEARCH_MATCH_CURRENT

Instead of having a confusing mode argument, define more constants.


Commit: b6cf72f6daa8589efa18bfc4845a752f867ca6ae
    http://github.com/barnowl/barnowl/commit/b6cf72f6daa8589efa18bfc4845a752f867ca6ae
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M commands.c
  M keys.c
  M viewwin.c

Log Message:
-----------
FINALLY! Add a popless:search command

That took a while.


Commit: d2fd2f78682e126efa7f07750844446b4746a5dc
    http://github.com/barnowl/barnowl/commit/d2fd2f78682e126efa7f07750844446b4746a5dc
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M commands.c
  M keys.c
  M viewwin.c

Log Message:
-----------
Add popless:start-search and bind to / and ?

The command line is considerably friendlier when it knows it's
searching.


Commit: dcd48ad47e4d55553e8d00fc32176e3b9548fa8a
    http://github.com/barnowl/barnowl/commit/dcd48ad47e4d55553e8d00fc32176e3b9548fa8a
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M keys.c

Log Message:
-----------
Disable, for now, the bindings for popless:start-command

They're not very polished, with the contexts and commands situation
being so fluid for now.


Commit: 1b8c3f80e370e8256036bafef98acc094a2c34aa
    http://github.com/barnowl/barnowl/commit/1b8c3f80e370e8256036bafef98acc094a2c34aa
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M owl.h
  M viewwin.c

Log Message:
-----------
owl_viewwin doesn't need to keep track of cmdline


Commit: 4a41f1621e8d6055c8a4ac848f34ea1acbf0ba0e
    http://github.com/barnowl/barnowl/commit/4a41f1621e8d6055c8a4ac848f34ea1acbf0ba0e
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-18 (Sat, 18 Sep 2010)

Changed paths:
  M editcontext.c
  M functions.c
  M viewwin.c

Log Message:
-----------
Pass deactivate_cb as argument to owl_editcontext_new


Commit: 118c9199a27438cd95333d4ef3faa2ccddab6622
    http://github.com/barnowl/barnowl/commit/118c9199a27438cd95333d4ef3faa2ccddab6622
Author: David Benjamin <davidben@mit.edu>
Date:   2010-09-21 (Tue, 21 Sep 2010)

Changed paths:
  M commands.c
  M functions.c
  M owl.h
  M viewwin.c

Log Message:
-----------
Name search argument consider_current

Adding yet another enum for a boolean value is overkill.



home help back first fref pref prev next nref lref last post