]> git.neil.brown.name Git - edlib.git/log
edlib.git
10 years agoBetter handling of formatting with render-complete.
NeilBrown [Wed, 2 Dec 2015 07:54:15 +0000 (18:54 +1100)]
Better handling of formatting with render-complete.

We highlight the common prefix and stripe all highlights
and quoting before using the string.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoFix bug causing render-complete to show a non-matching first line.
NeilBrown [Wed, 2 Dec 2015 07:35:54 +0000 (18:35 +1100)]
Fix bug causing render-complete to show a non-matching first line.

That "Move-to" needs to get through.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agosearch: make sure point is visible when search is aborted.
NeilBrown [Wed, 2 Dec 2015 03:51:16 +0000 (14:51 +1100)]
search: make sure point is visible when search is aborted.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agorender-format: allow '<' characters in format fields.
NeilBrown [Wed, 2 Dec 2015 03:40:23 +0000 (14:40 +1100)]
render-format: allow '<' characters in format fields.

These need to be quoted.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoUse the © copyright character is copyright messages.
NeilBrown [Wed, 2 Dec 2015 03:22:33 +0000 (14:22 +1100)]
Use the © copyright character is copyright messages.

Because I can...

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoAdd lib-messageline.
NeilBrown [Wed, 2 Dec 2015 03:19:07 +0000 (14:19 +1100)]
Add lib-messageline.

This places a line on the bottom on the display and displayed messages there.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoncurses: allow use of full screen.
NeilBrown [Wed, 2 Dec 2015 02:26:07 +0000 (13:26 +1100)]
ncurses: allow use of full screen.

If we want to trim a line off the bottom, do it separately.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoSave search string for later re-use.
NeilBrown [Wed, 2 Dec 2015 02:23:58 +0000 (13:23 +1100)]
Save search string for later re-use.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoDisable recursive popups except by permission.
NeilBrown [Wed, 2 Dec 2015 02:11:24 +0000 (13:11 +1100)]
Disable recursive popups except by permission.

So trying to search in a file-file buffer now doesn't work.

This might need work for searching in a completion list??

Signed-off-by: NeilBrown <neil@brown.name>
10 years agotile: fix 'next' to walk through all pop-ups.
NeilBrown [Wed, 2 Dec 2015 01:56:07 +0000 (12:56 +1100)]
tile: fix 'next' to walk through all pop-ups.

Still need to work on 'prev'!

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoMove root popups to the tile-root.
NeilBrown [Wed, 2 Dec 2015 01:05:06 +0000 (12:05 +1100)]
Move root popups to the tile-root.

Having popups always attached to tiles seems clean and will make
pane-movement easier.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoPage up/down now move cursor to EOF when appropriate.
NeilBrown [Wed, 2 Dec 2015 00:02:14 +0000 (11:02 +1100)]
Page up/down now move cursor to EOF when appropriate.

emacs doesn't do this, but I think it looks better... maybe.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoFix page-up/down in directory listings.
NeilBrown [Tue, 1 Dec 2015 22:46:28 +0000 (09:46 +1100)]
Fix page-up/down in directory listings.

If the target for cursorXY is in the header line, we need to adjust.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoIntroduce some 'call*' functions to call command.
NeilBrown [Tue, 1 Dec 2015 22:11:32 +0000 (09:11 +1100)]
Introduce some 'call*' functions to call command.

This simplifies lots of code.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoQuote regex chars when they are included from doc into search string.
NeilBrown [Tue, 1 Dec 2015 20:53:00 +0000 (07:53 +1100)]
Quote regex chars when they are included from doc into search string.

Also handle unicode search properly.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agotext: fix bug with adding at end of allocation.
NeilBrown [Tue, 1 Dec 2015 20:43:18 +0000 (07:43 +1100)]
text: fix bug with adding at end of allocation.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRename comm_ncurses to display_ncurses
NeilBrown [Tue, 1 Dec 2015 20:35:02 +0000 (07:35 +1100)]
Rename comm_ncurses to display_ncurses

"comm_" is part of an old deprecated naming scheme.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoMerge commit '52780b336a46654163e0d34204a0aad0da5fdf33'
NeilBrown [Tue, 1 Dec 2015 20:19:43 +0000 (07:19 +1100)]
Merge commit '52780b336a46654163e0d34204a0aad0da5fdf33'

10 years agoMove the authoritative 'point' out of the pane and into the doc_data.
NeilBrown [Sun, 29 Nov 2015 21:50:58 +0000 (08:50 +1100)]
Move the authoritative 'point' out of the pane and into the doc_data.

This seems a more sensible location.
The point still exists in the pane as it is very useful, but this is
now just a 'borrowed' pointer.

This required changing doc_attr to only examine a single pane.
Probably makes sense for now.

Next patch will make changes to how points in panes are managed.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoFix up entry of multi-byte UTF-8
NeilBrown [Sun, 29 Nov 2015 21:50:01 +0000 (08:50 +1100)]
Fix up entry of multi-byte UTF-8

I wasn't handling wide characters on text-entry, and
text_round_len was wrong.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoInitial python support.
NeilBrown [Sun, 29 Nov 2015 21:49:16 +0000 (08:49 +1100)]
Initial python support.

Add a new loadable module 'lang-python' which provides a
"python-load" command which will run a python script.

This has access to panes and marks and can send and receive commands...
At least it can in principle - only limited testing so far.

I think it is a good starting point for python support.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoAdd another check for a NULL string.
NeilBrown [Fri, 27 Nov 2015 05:06:08 +0000 (16:06 +1100)]
Add another check for a NULL string.

This allows render_line_prev to make more sense at end-of-doc.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoAllow both start- and end- of file movements in render-complete.
NeilBrown [Fri, 27 Nov 2015 05:04:16 +0000 (16:04 +1100)]
Allow both start- and end- of file movements in render-complete.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoEOF in *Documents* is a null pointer, not the last entry.
NeilBrown [Fri, 27 Nov 2015 05:03:22 +0000 (16:03 +1100)]
EOF in *Documents* is a null pointer, not the last entry.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agorender-complete: if at EOF, there won't be a string, so be careful.
NeilBrown [Fri, 27 Nov 2015 04:35:56 +0000 (15:35 +1100)]
render-complete: if at EOF, there won't be a string, so be careful.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoAdd notifier to non-home panes on a doc.
NeilBrown [Fri, 27 Nov 2015 04:21:01 +0000 (15:21 +1100)]
Add notifier to non-home panes on a doc.

Use this to clean up and install a new document when the old one dies.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agodoc_destroy: don't close the pane before sending the destroy message to it.
NeilBrown [Fri, 27 Nov 2015 04:20:22 +0000 (15:20 +1100)]
doc_destroy: don't close the pane before sending the destroy message to it.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agodoc-dir: locate the editor before destroying the pane which lets us find it.
NeilBrown [Fri, 27 Nov 2015 04:18:29 +0000 (15:18 +1100)]
doc-dir: locate the editor before destroying the pane which lets us find it.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoMake sure to initialize all 'cmd_info'.
NeilBrown [Fri, 27 Nov 2015 04:17:20 +0000 (15:17 +1100)]
Make sure to initialize all 'cmd_info'.

Missed this one.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoChange doc panes to have an allocated 'data'.
NeilBrown [Fri, 27 Nov 2015 02:05:49 +0000 (13:05 +1100)]
Change doc panes to have an allocated 'data'.

This allows us to store other stuff than just the document.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agodiscard doc_first_mark in favour of vmark_first.
NeilBrown [Fri, 27 Nov 2015 02:04:23 +0000 (13:04 +1100)]
discard doc_first_mark in favour of vmark_first.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoChange popup to store the doc rather than the pane for the temp document.
NeilBrown [Fri, 27 Nov 2015 01:55:27 +0000 (12:55 +1100)]
Change popup to store the doc rather than the pane for the temp document.

This makes it easier to eventually destroy.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agochange doc_new to return a doc.
NeilBrown [Fri, 27 Nov 2015 01:53:29 +0000 (12:53 +1100)]
change doc_new to return a doc.

some callers want to set the name, and that currently requires the actual doc.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoDiscard doc_get_pane() in favour of doc_from_pane()
NeilBrown [Fri, 27 Nov 2015 01:13:30 +0000 (12:13 +1100)]
Discard doc_get_pane() in favour of doc_from_pane()

The pane was (almost) never used other than to extract the document,
so just return the document.

This will allow us to change the ->data stored on a document pane.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoAdd 'void *misc' field to cmd_info
NeilBrown [Fri, 27 Nov 2015 01:05:10 +0000 (12:05 +1100)]
Add 'void *misc' field to cmd_info

Use this for passing the 'struct stat' for doc:same-file.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoGet rid of rl_mark and lots of casts.
NeilBrown [Fri, 27 Nov 2015 00:50:08 +0000 (11:50 +1100)]
Get rid of rl_mark and lots of casts.

Now that all marks have mdata, we don't need this extension.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoGet rid of 'struct point'.
NeilBrown [Fri, 27 Nov 2015 00:37:03 +0000 (11:37 +1100)]
Get rid of 'struct point'.

Just use 'struct mark' which now as a void* mdata for extension.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoMove size field from point to point->links.
NeilBrown [Fri, 27 Nov 2015 00:08:00 +0000 (11:08 +1100)]
Move size field from point to point->links.

Now a point is nearly the same as a mark.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove ->doc field from point.
NeilBrown [Fri, 27 Nov 2015 00:04:10 +0000 (11:04 +1100)]
Remove ->doc field from point.

No longer needed.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agouse doc_get_pane to find document in search functions.
NeilBrown [Fri, 27 Nov 2015 00:02:57 +0000 (11:02 +1100)]
use doc_get_pane to find document in search functions.

..because I don't want point to hold the doc anymore.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoin doc-dir we can use ->home->data to get document.
NeilBrown [Thu, 26 Nov 2015 23:58:44 +0000 (10:58 +1100)]
in doc-dir we can use ->home->data to get document.

And use ->mark to find point too.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agodoc_attr: pass pane instead of doc
NeilBrown [Thu, 26 Nov 2015 23:52:32 +0000 (10:52 +1100)]
doc_attr: pass pane instead of doc

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoPoint_notify_change: pass doc explicitly, don't use point.
NeilBrown [Thu, 26 Nov 2015 23:49:52 +0000 (10:49 +1100)]
Point_notify_change: pass doc explicitly, don't use point.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove use of point->doc from point fore/back to mark.
NeilBrown [Thu, 26 Nov 2015 23:48:11 +0000 (10:48 +1100)]
Remove use of point->doc from point fore/back to mark.

No longer needed.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove doc arg from doc_next_mark.
NeilBrown [Thu, 26 Nov 2015 23:46:05 +0000 (10:46 +1100)]
Remove doc arg from doc_next_mark.

It is no longer needed.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agotlist_for_each{,_entry}_continue* no longer need head of list.
NeilBrown [Thu, 26 Nov 2015 23:40:39 +0000 (10:40 +1100)]
tlist_for_each{,_entry}_continue* no longer need head of list.

We can use the type information to stop at the right place.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove unused function point_reset
NeilBrown [Thu, 26 Nov 2015 23:31:44 +0000 (10:31 +1100)]
Remove unused function point_reset

Signed-off-by: NeilBrown <neil@brown.name>
10 years agosimplify/improve mark-at-point functions.
NeilBrown [Thu, 26 Nov 2015 23:26:56 +0000 (10:26 +1100)]
simplify/improve mark-at-point functions.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoPass pane to doc_set_attr instead of using pt->doc;
NeilBrown [Thu, 26 Nov 2015 22:35:18 +0000 (09:35 +1100)]
Pass pane to doc_set_attr instead of using pt->doc;

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove ->owner field from point.
NeilBrown [Thu, 26 Nov 2015 22:18:49 +0000 (09:18 +1100)]
Remove ->owner field from point.

No longer needed.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoPoints: allocate list of links separately.
NeilBrown [Thu, 26 Nov 2015 22:10:16 +0000 (09:10 +1100)]
Points: allocate list of links separately.

It was just too much hassle having a single allocation and managing
a single pointer to a point.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove ci->pointp
NeilBrown [Thu, 26 Nov 2015 07:11:36 +0000 (18:11 +1100)]
Remove ci->pointp

Now completely gone.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove pointless doc and pointp from emacs_file_complete and emac_doc_complete
NeilBrown [Thu, 26 Nov 2015 07:07:12 +0000 (18:07 +1100)]
Remove pointless doc and pointp from emacs_file_complete and emac_doc_complete

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoemacs_findfile: use pane_attr_get instead of doc_attr.
NeilBrown [Thu, 26 Nov 2015 07:04:32 +0000 (18:04 +1100)]
emacs_findfile: use pane_attr_get instead of doc_attr.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoemacs_kill_doc - no pointp
NeilBrown [Thu, 26 Nov 2015 07:00:06 +0000 (18:00 +1100)]
emacs_kill_doc - no pointp

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove last pointp from render-lines
NeilBrown [Thu, 26 Nov 2015 06:57:59 +0000 (17:57 +1100)]
Remove last pointp from render-lines

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoStop using pointp for Move-View-Pos
NeilBrown [Thu, 26 Nov 2015 06:56:09 +0000 (17:56 +1100)]
Stop using pointp for Move-View-Pos

Signed-off-by: NeilBrown <neil@brown.name>
10 years agocomplete_return doesn't need pointp either.
NeilBrown [Thu, 26 Nov 2015 06:44:11 +0000 (17:44 +1100)]
complete_return doesn't need pointp either.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoChange complete_set_prefix to no need direct access to point/doc
NeilBrown [Thu, 26 Nov 2015 06:42:30 +0000 (17:42 +1100)]
Change complete_set_prefix to no need direct access to point/doc

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove pointp usage from emacs insert/delete commands.
NeilBrown [Thu, 26 Nov 2015 06:21:06 +0000 (17:21 +1100)]
Remove pointp usage from emacs insert/delete commands.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove pointp usage from a lot of Move-* calls.
NeilBrown [Thu, 26 Nov 2015 06:14:08 +0000 (17:14 +1100)]
Remove pointp usage from a lot of Move-* calls.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove doc arg from mark_to_mark.
NeilBrown [Thu, 26 Nov 2015 06:10:50 +0000 (17:10 +1100)]
Remove doc arg from mark_to_mark.

It isn't really neded.
We can easily remove doc from doc_next_mark_all() as it isn't used.
We can also have a version of doc_prev_mark_all() that only gets
called when we *know* there is a previos mark, as we do ni mark_to_mark.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoSend point as ci->mark for events from keyboard or mouse.
NeilBrown [Thu, 26 Nov 2015 05:52:43 +0000 (16:52 +1100)]
Send point as ci->mark for events from keyboard or mouse.

I am deprecating ->pointp, but sometimes I need that mark.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoDon't set pointp for "Replace"
NeilBrown [Thu, 26 Nov 2015 05:38:17 +0000 (16:38 +1100)]
Don't set pointp for "Replace"

no replace function uses it anymore.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoChange "Refresh" function to pass 'point' via ci->mark.
NeilBrown [Thu, 26 Nov 2015 05:10:15 +0000 (16:10 +1100)]
Change "Refresh" function to pass 'point' via ci->mark.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoChange render-line command to accept point in 'mark2' instead of 'ptp'.
NeilBrown [Thu, 26 Nov 2015 04:36:02 +0000 (15:36 +1100)]
Change render-line command to accept point in 'mark2' instead of 'ptp'.

And get rid of point pointp stuff.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove pointp arg for render-line-prev
NeilBrown [Thu, 26 Nov 2015 04:22:10 +0000 (15:22 +1100)]
Remove pointp arg for render-line-prev

We only needed the doc, and we can get that from the pane.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoStop using pointp in text_reundo and text_replace.
NeilBrown [Thu, 26 Nov 2015 04:12:45 +0000 (15:12 +1100)]
Stop using pointp in text_reundo and text_replace.

use home->data and home->point instead.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agotext_reundo: rename 'm' to 'm2'.
NeilBrown [Thu, 26 Nov 2015 04:11:53 +0000 (15:11 +1100)]
text_reundo: rename 'm' to 'm2'.

I want to introduce a more global 'm'.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoMove final doc default actions from 'view' to 'doc'.
NeilBrown [Thu, 26 Nov 2015 03:58:06 +0000 (14:58 +1100)]
Move final doc default actions from 'view' to 'doc'.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoImprove default move-file
NeilBrown [Thu, 26 Nov 2015 03:50:46 +0000 (14:50 +1100)]
Improve default move-file

Instead of moving one char at a time, just jump to the right end.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoNow that move_X is in core-doc, remove the pointp references.
NeilBrown [Thu, 26 Nov 2015 03:39:01 +0000 (14:39 +1100)]
Now that move_X is in core-doc, remove the pointp references.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agomove simple word/char/eol/file movement from 'view' to 'doc'.
NeilBrown [Thu, 26 Nov 2015 03:34:01 +0000 (14:34 +1100)]
move simple word/char/eol/file movement from 'view' to 'doc'.

I think it makes more sense here.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoremove two pointp users from emacs-search.
NeilBrown [Thu, 26 Nov 2015 03:18:16 +0000 (14:18 +1100)]
remove two pointp users from emacs-search.

Just use doc_replace to trigger a refresh.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove render-dir and render-text
NeilBrown [Thu, 26 Nov 2015 02:16:28 +0000 (13:16 +1100)]
Remove render-dir and render-text

Increasingly dead-weight.  Now that we have render-lines and
render-format, these can go.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agouse doc_get_pane to get document for render-format movement.
NeilBrown [Thu, 26 Nov 2015 02:12:30 +0000 (13:12 +1100)]
use doc_get_pane to get document for render-format movement.

Removes another pointp user

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove pointp from render_hex_eol.
NeilBrown [Thu, 26 Nov 2015 02:07:48 +0000 (13:07 +1100)]
Remove pointp from render_hex_eol.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoUse panes and marks to communicate with CountLines
NeilBrown [Thu, 26 Nov 2015 01:57:04 +0000 (12:57 +1100)]
Use panes and marks to communicate with CountLines

so no more pointp;

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoDo for dir_close what we did for docs_bury.
NeilBrown [Thu, 26 Nov 2015 01:46:23 +0000 (12:46 +1100)]
Do for dir_close what we did for docs_bury.

It really is the same thing.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove pointp setting from mark_same_pane
NeilBrown [Thu, 26 Nov 2015 01:45:10 +0000 (12:45 +1100)]
Remove pointp setting from mark_same_pane

completely pointless

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove pointp usage from text_save_file and text_get_str
NeilBrown [Thu, 26 Nov 2015 01:41:20 +0000 (12:41 +1100)]
Remove pointp usage from text_save_file and text_get_str

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoNotfiy:Replace doesn't need pointp any more.
NeilBrown [Thu, 26 Nov 2015 01:35:42 +0000 (12:35 +1100)]
Notfiy:Replace doesn't need pointp any more.

So discard it.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoUse "Notify:Replace" for notifications.
NeilBrown [Thu, 26 Nov 2015 01:32:19 +0000 (12:32 +1100)]
Use "Notify:Replace" for notifications.

We currently use "Notify" both to make changes and to notify
of changes.
This can be confusion - they are different tasks needing different names.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agodocs_destroy - avoid pointp.
NeilBrown [Thu, 26 Nov 2015 01:25:26 +0000 (12:25 +1100)]
docs_destroy - avoid pointp.

Use doc_get_pane instead.

Maybe I should be sending a message....

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoChange doc:destroy to work with pane rather than point.
NeilBrown [Thu, 26 Nov 2015 01:09:15 +0000 (12:09 +1100)]
Change doc:destroy to work with pane rather than point.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove pane_point.
NeilBrown [Thu, 26 Nov 2015 01:06:40 +0000 (12:06 +1100)]
Remove pane_point.

Only one called remains, so open-code it there.

That caller should eventually go too.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRemove dependence of search on pane_point.
NeilBrown [Thu, 26 Nov 2015 01:02:56 +0000 (12:02 +1100)]
Remove dependence of search on pane_point.

This requires PointDup being able to provide a simple mark,
and a new function to find the document pane.

Signed-off-by: NeilBrown <neil@brown.name>
10 years ago"Close" no longer needs pane_point.
NeilBrown [Thu, 26 Nov 2015 00:46:07 +0000 (11:46 +1100)]
"Close" no longer needs pane_point.

render_lines was the last users, and it now uses panes for vmarks.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoChange vmark functions to take a pane instead of a document.
NeilBrown [Thu, 26 Nov 2015 00:34:47 +0000 (11:34 +1100)]
Change vmark functions to take a pane instead of a document.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoChange vmark_matching to take a pane rather than a doc.
NeilBrown [Thu, 26 Nov 2015 00:08:51 +0000 (11:08 +1100)]
Change vmark_matching to take a pane rather than a doc.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRender-attach functions no-longer need the pane_point.
NeilBrown [Wed, 25 Nov 2015 23:21:11 +0000 (10:21 +1100)]
Render-attach functions no-longer need the pane_point.

So discard it.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoChange doc_{add,del,find}_view into commands.
NeilBrown [Wed, 25 Nov 2015 23:14:24 +0000 (10:14 +1100)]
Change doc_{add,del,find}_view into commands.

they get send to the document instead of having to find it.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoRegister keymaps early rather than late.
NeilBrown [Wed, 25 Nov 2015 23:11:04 +0000 (10:11 +1100)]
Register keymaps early rather than late.

The more we use them, the more careful we must be.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoChange mark_same to key off tile rather than point.
NeilBrown [Wed, 25 Nov 2015 22:48:48 +0000 (09:48 +1100)]
Change mark_same to key off tile rather than point.

Thus remove pointp reference from render-lines-notify

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoHave all "render-line" function fail cleanly if point/mark are NULL.
NeilBrown [Wed, 25 Nov 2015 22:36:49 +0000 (09:36 +1100)]
Have all "render-line" function fail cleanly if point/mark are NULL.

This makes it a bit cleaner to find the render-line pane with a void call.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoProvide a "Move-to" command to use e.g. when completing a search.
NeilBrown [Wed, 25 Nov 2015 22:27:37 +0000 (09:27 +1100)]
Provide a "Move-to" command to use e.g. when completing a search.

Better than direct access to point_to_mark().

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoChange default_render from a struct field to an attribute.
NeilBrown [Wed, 25 Nov 2015 22:15:51 +0000 (09:15 +1100)]
Change default_render from a struct field to an attribute.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoUse Move-File to move to start of a newly created document.
NeilBrown [Wed, 25 Nov 2015 22:10:16 +0000 (09:10 +1100)]
Use Move-File to move to start of a newly created document.

This is cleaner than moving the point directly

Signed-off-by: NeilBrown <neil@brown.name>
10 years agotext: fit bug with text deletion.
NeilBrown [Wed, 25 Nov 2015 21:47:07 +0000 (08:47 +1100)]
text: fit bug with text deletion.

I wasn't quite leaving things is a good state.
I think this is better - as this ref no longer over-takes
a follow ref that won't be relocated.
But I really need to review this code.

Signed-off-by: NeilBrown <neil@brown.name>
10 years agoemacs: use pane_final_child rather than pane_point.
NeilBrown [Wed, 25 Nov 2015 09:46:37 +0000 (20:46 +1100)]
emacs: use pane_final_child rather than pane_point.

This is (now) a suitable place to attach attributes.

Signed-off-by: NeilBrown <neil@brown.name>