[1544] in BarnOwl Developers
[nelhage/barnowl] a556ca: Mostly refactor the editwin to use a linear buffer...
daemon@ATHENA.MIT.EDU (noreply@github.com)
Thu Oct 29 18:17:49 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@lunatique.mit.edu
Date: Sat, 11 Jul 2009 10:27:37 -0700
To: barnowl-dev@mit.edu
From: noreply@github.com
Branch: refs/heads/editwin
Home: http://github.com/nelhage/barnowl
Commit: a556caa6cc599f80f613bcf8239a5c6550f1049c
http://github.com/nelhage/barnowl/commit/a556caa6cc599f80f613bcf8239a5c6550f1049c
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M commands.c
M editwin.c
M global.c
M owl.h
M perlconfig.c
Log Message:
-----------
Mostly refactor the editwin to use a linear buffer position.
Use a linear buffer positino to keep track of the point, rather than
(x, y).
In addition, make the editwin structure private to editwin.c. (No
abstraction violation for you!)
Add some abstractions for pointer movement, and use them in some places.
Commit: bd1a1ae26f1b49e0abbba68d6825650707a9911b
http://github.com/nelhage/barnowl/commit/bd1a1ae26f1b49e0abbba68d6825650707a9911b
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
Basic new redisplay + point at end of buffer + tabs
The core of the new redisplay. Now featuring tabs, and properly
wrapping lines.
And I kludged around the problem with the point being at the end of
the buffer.
Commit: e20d8179b1fbc0ba21fd86101cc72d18fcc65cf5
http://github.com/nelhage/barnowl/commit/e20d8179b1fbc0ba21fd86101cc72d18fcc65cf5
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
misc refactoring & cleanup
(including a nuke-trailing-whitespace)
Commit: 19f765df042349d8e0ae2c2bc8cde0042ce35f84
http://github.com/nelhage/barnowl/commit/19f765df042349d8e0ae2c2bc8cde0042ce35f84
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
Refactoring + cleanup.
Factor oe_display_line out of owl_editwin_redisplay so that I can
use it in oe_reframe. I think this ends up making some of the cursor
placement stuff simpler as a side effect.
Also cleanup an unused variable in owl_editwin_point_move.
Commit: d7043b4cbdf98534c5f62589ad3dac72b3410873
http://github.com/nelhage/barnowl/commit/d7043b4cbdf98534c5f62589ad3dac72b3410873
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
simplify line_move goal_column logic
Commit: a0fbdee028b499693f5f92b95735896419ce4778
http://github.com/nelhage/barnowl/commit/a0fbdee028b499693f5f92b95735896419ce4778
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
s/_?owl_editwin_(save_|restore_|)excursion/oe_\1excursion/
(and move the functions up in the file)
Commit: cedc95c733c5114269681fcb5e1a5ca404227513
http://github.com/nelhage/barnowl/commit/cedc95c733c5114269681fcb5e1a5ca404227513
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
Framer works.
(+ some cursor detection fixup, and, hey, you need to erase the window
if you decide to reframe)
Commit: b5ef65c9806c5e1f3fd849697b929156d469dabd
http://github.com/nelhage/barnowl/commit/b5ef65c9806c5e1f3fd849697b929156d469dabd
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
owl_editwin_get_numchars_on_line is dead code
Commit: 77d44021216b5ce6f3ec8b25a7b1d96e37e1e51c
http://github.com/nelhage/barnowl/commit/77d44021216b5ce6f3ec8b25a7b1d96e37e1e51c
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
cursor location improved; other behavior
The cursor locater now handles wrapped lines /better/ but still messes up
when the line is the width of the screen and the cursor is at the end
(so it should be a the beginning of a blank screen line)
C-a set the goal column
kill-to-end-of-line will eat a final newline and thus join.
Commit: 2021beaa653369127e29d16159262d57131ac519
http://github.com/nelhage/barnowl/commit/2021beaa653369127e29d16159262d57131ac519
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
Last (for now) known cursor location bug
Commit: 6073462da6d33eeb0be7ca4810d0590b16f2b364
http://github.com/nelhage/barnowl/commit/6073462da6d33eeb0be7ca4810d0590b16f2b364
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
make owl_editwin_adjust_for_locktext go away
(and cleanse owl_editwin_clear slightly)
Commit: 521bc8412b2f592277a72eb4a6536bc019dad801
http://github.com/nelhage/barnowl/commit/521bc8412b2f592277a72eb4a6536bc019dad801
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
setter for e->index such that cached data invalidates when the point moves
Commit: bab52da15f80d81b3da5d94fbc838d058bfbe3b0
http://github.com/nelhage/barnowl/commit/bab52da15f80d81b3da5d94fbc838d058bfbe3b0
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
make a bunch of stuff static, possibly inline, maybe remove a leading _
Commit: 98f1e69376a8ef5af480c7e7fbe2a27191117ef7
http://github.com/nelhage/barnowl/commit/98f1e69376a8ef5af480c7e7fbe2a27191117ef7
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
garbage collect some functions "we ain't gonna need"
(owl_editwin_set_history, int owl_editwin_get_numlines, owl_editwin_{get,set}_goal_column
Commit: 5b5f3e6b04725391003719bcddf597f5dae8fc13
http://github.com/nelhage/barnowl/commit/5b5f3e6b04725391003719bcddf597f5dae8fc13
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
general refactoring of things that change the buffer -> owl_editwin_replace
also much cleanup of now unused functions (_owl_editwin_addspace,
_owl_editwin_remove_bytes, _owl_editwin_insert_bytes,
owl_editwin_overwrite_char, owl_editwin_overwrite_string)
added oe_count_glyphs to count the actual number of printing characters
collapse owl_editwin_insert_char and _owl_editwin_process_character into
owl_editwin_process_character
owl_editwin_is_char_in supports unicode as wished for in the comment
owl_editwin_{forward,backward}_word that returns a distance
Commit: 7d25006f34ffe1098b842799458b465813be0a1b
http://github.com/nelhage/barnowl/commit/7d25006f34ffe1098b842799458b465813be0a1b
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
cleanup some dead word-wrapping code
Commit: ebf0128b17cb1846480ff7c1d97003b1d9ce79cc
http://github.com/nelhage/barnowl/commit/ebf0128b17cb1846480ff7c1d97003b1d9ce79cc
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
some line-wrap infrastructure + refactoring
Keep track of excursions and fix them up when replace needs to
Keep track of the current cursor x for word wrapping convenience
minor refactor owl_editwin_init v. owl_editwin_set_curswin
factor oe_char_width out of oe_find_display_line
factor oe_insert_char back out of owl_editwin_process_char
explicatory comment in owl_editwin_limit_maxcols
Commit: 2f21a41eb3479910d419b44e12745d6766d0d3e6
http://github.com/nelhage/barnowl/commit/2f21a41eb3479910d419b44e12745d6766d0d3e6
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
Cause emacs to set c-basic-offset correctly.
Commit: 8321cb70ee69ef4c661b0a3d5260910d20b2ffff
http://github.com/nelhage/barnowl/commit/8321cb70ee69ef4c661b0a3d5260910d20b2ffff
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
make sure the new editwin structure is zeroed out & release a potential dangling excursion
Commit: 16cfd12a36e59616a3972f1f42fe1615c4d02564
http://github.com/nelhage/barnowl/commit/16cfd12a36e59616a3972f1f42fe1615c4d02564
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
wrap words on insert character
ow, brain hurty.
Commit: 7f0c26f7782b597747f2f3b58cf1b0d067a8dff0
http://github.com/nelhage/barnowl/commit/7f0c26f7782b597747f2f3b58cf1b0d067a8dff0
Author: Nelson Elhage <nelhage@mit.edu>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M commands.c
M editwin.c
M keys.c
Log Message:
-----------
Implement a setable mark.
Commit: a60edf29aa3019eac300fcdff11cfb2576f46f69
http://github.com/nelhage/barnowl/commit/a60edf29aa3019eac300fcdff11cfb2576f46f69
Author: Nelson Elhage <nelhage@mit.edu>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M commands.c
M editwin.c
M keys.c
Log Message:
-----------
Implement kill-region, copy-region-as-kill, and yank.
Commit: 2da73482548054bd88ba616aea53da932fb3b2f4
http://github.com/nelhage/barnowl/commit/2da73482548054bd88ba616aea53da932fb3b2f4
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
remove anomalous whitespace
Commit: fc2677be1bd748f06e7854d251b7a413f6ea73d4
http://github.com/nelhage/barnowl/commit/fc2677be1bd748f06e7854d251b7a413f6ea73d4
Author: Nelson Elhage <nelhage@mit.edu>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
editwin: Clean up and fix owl_editwin_fill_paragraph
We now implement a two-pass algorithm, that first replaces all
whitespace with single spaces, and then goes through and inserts
newlines as necessary to fill words. The code is slightly longer, but
I think much cleaner.
Commit: 3e36085f3981a0aa56c15dc0d78f77f46a78b80b
http://github.com/nelhage/barnowl/commit/3e36085f3981a0aa56c15dc0d78f77f46a78b80b
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
Support echochar in the redisplay code.
Commit: 77f605d73ef6fda4022159af1e5a40416c47b28d
http://github.com/nelhage/barnowl/commit/77f605d73ef6fda4022159af1e5a40416c47b28d
Author: Karl Ramm <kcr@1ts.org>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
M perlglue.xs
Log Message:
-----------
Slightly more rope that you require for completion.
New owl_editwin_text_{before,after}_point, exported to perl. Also,
export owl_editwin_replace and owl_editwin_point_move.
Commit: 2fc8397e0117350e37ccc1b1b83ebcc9b94686d2
http://github.com/nelhage/barnowl/commit/2fc8397e0117350e37ccc1b1b83ebcc9b94686d2
Author: Nelson Elhage <nelhage@mit.edu>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M commands.c
M editwin.c
M keys.c
Log Message:
-----------
Implement {forward,backward}-paragraph
Commit: 19a023fdc2b99ba0224a0923ba7ff7bf5a3aed3a
http://github.com/nelhage/barnowl/commit/19a023fdc2b99ba0224a0923ba7ff7bf5a3aed3a
Author: Nelson Elhage <nelhage@mit.edu>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
Refactor owl_editwin_replace to allow more internal uses.
Commit: 0190c4dd0e3150bda87e2acd42562d10a4d20102
http://github.com/nelhage/barnowl/commit/0190c4dd0e3150bda87e2acd42562d10a4d20102
Author: Nelson Elhage <nelhage@mit.edu>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M perlglue.xs
Log Message:
-----------
perlglue.xs: Move editor functions into BarnOwl::Editwin::
Commit: a88f35a64d4d61e59e6dca10a9077b2cc9db4c84
http://github.com/nelhage/barnowl/commit/a88f35a64d4d61e59e6dca10a9077b2cc9db4c84
Author: Nelson Elhage <nelhage@mit.edu>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
M owl.h
M perlglue.xs
Log Message:
-----------
Give perl code more rope with respect to the editwin.
In particular, implement save_excursion and replace_region.
Commit: cf26b72e6c9a945a11b0859b9782b23d90435150
http://github.com/nelhage/barnowl/commit/cf26b72e6c9a945a11b0859b9782b23d90435150
Author: Nelson Elhage <nelhage@mit.edu>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M perl/lib/BarnOwl.pm
M perl/lib/BarnOwl/Editwin.pm
Log Message:
-----------
Add an Editwin.pm that allows importing of the editwin functions.
Commit: d41294aaa91d45609b2bd0139d5a9e0b91657c20
http://github.com/nelhage/barnowl/commit/d41294aaa91d45609b2bd0139d5a9e0b91657c20
Author: Nelson Elhage <nelhage@mit.edu>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
M perl/lib/BarnOwl/Editwin.pm
M perlglue.xs
Log Message:
-----------
Export some more functions to perl.
get_region, combined with save_excursion, is a very convenient way for
perl to access a specified piece of the buffer.
In addition, provide methods to get information about the current
point and mark.
Commit: c6ecf5c7b947ccf3045a8217895bcb3707cc40dd
http://github.com/nelhage/barnowl/commit/c6ecf5c7b947ccf3045a8217895bcb3707cc40dd
Author: Nelson Elhage <nelhage@mit.edu>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
M perl/lib/BarnOwl/Editwin.pm
M perlglue.xs
Log Message:
-----------
Implement text_{before,after)_point in Perl.
These can easily be implemented in perl using save_excursion and
get_region, so there's no need for them in C.
Commit: bd7fb587a0fcf472db16c0b1988a0a6ed33e72a6
http://github.com/nelhage/barnowl/commit/bd7fb587a0fcf472db16c0b1988a0a6ed33e72a6
Author: Nelson Elhage <nelhage@mit.edu>
Date: 2009-07-11 (Sat, 11 Jul 2009)
Changed paths:
M editwin.c
Log Message:
-----------
fill-paragraph: Fix a bug with eating whitespace after a sentence.