]>
git.neil.brown.name Git - edlib.git/log
NeilBrown [Sun, 13 Aug 2023 03:41:39 +0000 (13:41 +1000)]
lib-renderline: drop scale arg to do_draw()
We can find the scale from rline_data which we can find from the pane.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sun, 13 Aug 2023 03:35:42 +0000 (13:35 +1000)]
lib-renderline change rl vars to ri
rl vars which used to be for render-line are now for render-item,
so rename to ri.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 11 Aug 2023 07:20:26 +0000 (17:20 +1000)]
massive lib-renderline rewrite
This now passes my tests - after adjusting some tests.
lib-renderline is totally different. Parsing and processing are now
distinct steps. Hopefully this will make it easier to work with in
future, though it is still very rough in places, particularly with
handling for \t tabs.
I need to go through it several times and clean stuff up, but at least I
now have a credible base to work on.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 11 Aug 2023 05:51:03 +0000 (15:51 +1000)]
renderline - fix margin for tab.
For some strange reason, tabs were wrapping before other chars.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 11 Aug 2023 04:52:36 +0000 (14:52 +1000)]
Don't show default wrap tail for requested wrap point.
Requested wrap points suggest wrap is expected, so don't show the
wrap tail. I think it is ugly.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 11 Aug 2023 01:47:54 +0000 (11:47 +1000)]
tile: silence use-before-set warning.
"remain" is only used if "remaining" is not zero, so it will be set
before used. But compiler cannot see that. Help it out.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 9 Aug 2023 01:05:46 +0000 (11:05 +1000)]
messageline: don't ask for cursor on render-line
To avoid asking of a cursor, we need to pass -1.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 9 Aug 2023 01:04:35 +0000 (11:04 +1000)]
render-lines: pass focus to vmark_set()
Good practice is to always send the focus.
We will need this to get the prefix at 'set' time.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 9 Aug 2023 01:01:03 +0000 (11:01 +1000)]
history: use A-r rather than C-R for search
Using C-R and particularly C-S break search-replace because I can no
longer search-again from the replace box (which has history).
So switch to A-r A-s.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 9 Aug 2023 00:56:23 +0000 (10:56 +1000)]
lib-input - don't assume Efallthrough is 0
One day I might change Efallthrough..
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 9 Aug 2023 00:52:17 +0000 (10:52 +1000)]
ncurses: catch and ignore focus-in/out
focus-in/out comes in as unknown key at awkward times causing problems
for C-l and the refresh causes a focus-out.
So catch and ignore for now.
Also log any unrecognised keys so I can try to handle them.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 8 Aug 2023 22:49:22 +0000 (08:49 +1000)]
Change pane_resize() to return Bool
pane_resize() now reports if any change happened.
One caller wants this.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 8 Aug 2023 23:52:41 +0000 (09:52 +1000)]
render-lines: factor out code in revalidate_start()
revalidate start considers 3 cases when the point is on the line. Each
of these checks if the point is on the line.
Factor out that test and other code so that 3 (or 4) cases can focus on
their particular issue.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 8 Aug 2023 22:44:02 +0000 (08:44 +1000)]
render-lines: call_render_line_to_point never returns error
Don't test for call_render_line_to_point returning < 0, as it doesn't.
Don't even test for == 0. That is a valid answer and we no longer call
call_render_line_to_point() in a situation where that causes problems.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 8 Aug 2023 23:17:13 +0000 (09:17 +1000)]
render-lines: don't look for point in line where it isn't.
call_render_line_to_point() doesn't return an error, so calling
it when point isn't on the line isn't well defined.
So don't do it.
This changes the number of blank lines after end-of-file, which I think
I am happy with, so self-tests change.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 8 Aug 2023 22:27:38 +0000 (08:27 +1000)]
lib-server: fix a couple of typos
I mustn't be using this code enough because these should be obvious.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 8 Aug 2023 22:25:32 +0000 (08:25 +1000)]
minor unalloc improvements.
unalloc can now free 'const' pointers, and strings.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sat, 5 Aug 2023 09:00:52 +0000 (19:00 +1000)]
renderline: change render-line:measure to return the cursor attributes.
Rather than saving the attributes at the cursor to be returned later,
return them directly from render-line:measure.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 4 Aug 2023 23:56:59 +0000 (09:56 +1000)]
renderline: change render-line:findxy to return the attributes
Rather then remembers the attributes to be collected later with a
get:attr, return the attributes in a comm2 callback for immediate use.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 4 Aug 2023 23:21:04 +0000 (09:21 +1000)]
lib-renderline: change to use embedded pane data
The rline_data is now embedded in the pane.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 2 Aug 2023 21:10:31 +0000 (07:10 +1000)]
minor change to xcb drawing and scaling
1/ ask for "monospace", not "mono"
2/ default to 12 point
3/ scale up and down by same ratio. use 1.2 like others
4/ fix font_description size calc, which was weird.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 28 Jul 2023 06:09:11 +0000 (16:09 +1000)]
compose-email: check for needed headers:
Don't sent the messages unless there is at least
- From:
- Subject:
- To: or Cc:
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 28 Jul 2023 05:59:24 +0000 (15:59 +1000)]
discard commcache.
The idea here was to accelerate repeated calls to the one request, so we
didn't need to repeat the search up the pane tree, or for the comm in
the keymap.
However I since decided that it is generally best to avoid repeated
calls like this, and mostly we do.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Thu, 27 Jul 2023 11:32:07 +0000 (21:32 +1000)]
Avoid null pointer deref when ccache used.
This can make ->home NULL which times_up() no trips over.
I should probably discard this ccache stuff.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Thu, 27 Jul 2023 10:32:59 +0000 (20:32 +1000)]
emacs: support shows shell output in a popup.
With a prefix arg of 0 or 1, shellcmd still interpolates the output into
the current buffer.
With a prefix arg of 4, it now shows the output in a popup window, like
visiting a file with
Cx 4 4 f
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Thu, 27 Jul 2023 06:33:29 +0000 (16:33 +1000)]
Factor out list sorting into list.h
No point having two copies of the same code.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Thu, 27 Jul 2023 06:23:00 +0000 (16:23 +1000)]
renderline: calculate curs_width even when only a prefix is displayed.
Also make sure that the size we shift is always at least 1 - else it
loops forever.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Mon, 24 Jul 2023 11:31:02 +0000 (21:31 +1000)]
mode-emacs: allow cx-} and cx-{ to be repeated with single char.
Just like cx-< etc
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Mon, 24 Jul 2023 11:21:23 +0000 (21:21 +1000)]
lib-renderline: fix handling of truncation.
When looking for a bug in wrap-mode I found this bug in non-wrap mode.
But I cannot reproduce the first bug any more.
Weird.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Mon, 24 Jul 2023 11:17:51 +0000 (21:17 +1000)]
Don't initialise ->data in pane_init()
There may not be a ->data any more, and the caller initialises this if needed.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sun, 23 Jul 2023 23:04:16 +0000 (09:04 +1000)]
Rename _CALL _VFUNC _VFUNC_
All names that start underscore followed by capital letter are reserved
by C library. So stop using them.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sun, 23 Jul 2023 22:59:39 +0000 (08:59 +1000)]
Avoid using names with "__" prefix.
Names prefixed with "__" are reserved for use by the C library.
For global names, use "do_" instead.
For local name, use a single "_".
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sat, 22 Jul 2023 02:45:51 +0000 (12:45 +1000)]
Add doc:list-sort and sort command name for completion.
doc:list-sort can sort entries in a doc-list based on an attribute of
choice.
emacs command listing uses this.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sat, 22 Jul 2023 02:42:54 +0000 (12:42 +1000)]
emacs: use doc-list for command name completion.
doc-list is good for this sort of thing.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sat, 22 Jul 2023 02:06:44 +0000 (12:06 +1000)]
Change times_up() to use pane_too_long() on root.
Also check for debugger in all pane_too_long() calls.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sat, 22 Jul 2023 01:37:38 +0000 (11:37 +1000)]
Don't impose time limits when run under a debugger
Single-stepping in the debug can make things take much longer. We
shouldn't let that change behaviour or debugging becomes harder.
So detect debugger and skip the timing.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 10:34:50 +0000 (20:34 +1000)]
compose-email: use menu for address completion
Rather than having 'tab' cycle through addresses, drop down a menu to
choose from.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 10:33:28 +0000 (20:33 +1000)]
menu: allow memu to get wider
If menu gets smaller we already reduce size.
Now we do so when menu gets bigger too.
For this, we add 1 to width so there is a change for it to appear wider
as the width reported is only ever the visible width.
This makes all menus slightly wider.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 08:43:30 +0000 (18:43 +1000)]
notmuch: focus on query pane when changing messages
The previous patch didn't fix this properly. 'K-a' wasn't handled for
examine.
Try again.
Fixes: 5707b369a802 ("notmuch: when moving among messages, set focus to query pane.")
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 08:29:18 +0000 (18:29 +1000)]
history: improve stability of search.
When searching for string that matched at start of line, we would stay
on the line as we typed more of the match.
When searching elsewhere, we keep moving backward in the history.
Fix by always starting search at end of line.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 08:08:44 +0000 (18:08 +1000)]
popup: fix popup_child_notify
Two silly typos meant this didn't work properly.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 07:48:29 +0000 (17:48 +1000)]
render-lines: fix cursor-placement sometimes off-screen
I was measuring against the bottom of the cursor, not the top.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 06:52:13 +0000 (16:52 +1000)]
wiggle: skeletal support for IgnoreBlanks
I don't know if I would ever want IgnoreBlanks, but this shows some of
the changes that would be needed for it to work.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 04:50:47 +0000 (14:50 +1000)]
mergeview: highlight result after change.
When an alt-m command replaces the merge with some result, highlight the
result to help user see exactly what it is.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 04:45:43 +0000 (14:45 +1000)]
wiggle: nul-terminate string from collect_merge()
I love untested code.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 03:10:27 +0000 (13:10 +1000)]
lib-abbrev: Don't show a menu when not needed.
If there is only one match, just insert it, don't show a menu.
If all matches have a common prefix, just insert that.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 02:33:24 +0000 (12:33 +1000)]
make: possibly fix problem with not always following.
This is just a guess, but maybe this is why make sometimes doesn't
follow the output properly.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 02:21:24 +0000 (12:21 +1000)]
.gitingore updates.
Added these targets and forgot to tell git.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 02:17:46 +0000 (12:17 +1000)]
doc-test: doc:clear must send doc:replaced
Without this, linecount gets badly confused.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 01:27:17 +0000 (11:27 +1000)]
render-lines: improvements to left shift.
If there is lots of space on the right, only shift left if the cursor
requires it.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 01:08:23 +0000 (11:08 +1000)]
render-lines: remove obvious error
There can be no justification to multiply by cw twice.
This doesn't affect display-ncurses but is problematic for x11
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 21 Jul 2023 00:24:16 +0000 (10:24 +1000)]
render-lines: ensure cursor doesn't fall off end of line.
If the line is not allowed to left-shift and doesn't wrap, cursor might
be off the right edge.
In that case, do think that the cursor is drawn.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 19 Jul 2023 10:46:11 +0000 (20:46 +1000)]
TODO - lots of updates
So much to do, so little time.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 19 Jul 2023 10:34:13 +0000 (20:34 +1000)]
lib-utf8: use do_char_byte()
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 19 Jul 2023 10:30:04 +0000 (20:30 +1000)]
qprint: use do_char_byte()
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 19 Jul 2023 10:24:49 +0000 (20:24 +1000)]
lib-crop: use do_char_byte()
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 19 Jul 2023 10:17:38 +0000 (20:17 +1000)]
crop: switch to embedded pane data
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 19 Jul 2023 10:01:17 +0000 (20:01 +1000)]
base64: use do_char_byte
I duplicated the code.. I wonder if I should have done.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 19 Jul 2023 09:51:12 +0000 (19:51 +1000)]
mulitpath: use do_char_byte()
Just a simple conversion using mp_step largely unchanged.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 19 Jul 2023 09:43:54 +0000 (19:43 +1000)]
render-format: use do_char_byte()
This requires some more ugly #define stuff, but I think the code sharing
is good.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 19 Jul 2023 09:11:13 +0000 (19:11 +1000)]
render-format: switch to embedded pane data
pane data is now embedded.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 19 Jul 2023 09:01:36 +0000 (19:01 +1000)]
doc-email use do_char_byte for the doc:char function
do_char_byte now passes a mark to the next/prev functions and doc-email
makes use of it.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 19 Jul 2023 08:41:22 +0000 (18:41 +1000)]
doc-email: switch to embedded data.
struct email_view is now embedded in the pane, no found by a pointer deref.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 18 Jul 2023 11:39:19 +0000 (21:39 +1000)]
emacs: don't move cursor when opening/selecting menu.
Having the cursor jump around looks noisy, so try removing it.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 18 Jul 2023 11:32:48 +0000 (21:32 +1000)]
Move-CursorXY - only perform action on direct hit.
If Move-CursoyXY don't find a character under the cursor, don't perform
the action. Still move the mark though.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 18 Jul 2023 11:05:51 +0000 (21:05 +1000)]
Always pass 0 to Move-CursorXY for num and num2
The num and num2 values aren't used, and the values passed aren't
consistent.
The new meaning of "str" takes over what some of them were meant to do.
So always pass 0. Maybe one day I'll think of something useful to do.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 18 Jul 2023 10:57:36 +0000 (20:57 +1000)]
Change how Move-CursorXY is passed "no change" co-ordinates.
Currently a negative co-ordinate means "use the ->cx/cy value of the target
pane". This allows changing position in one dimension only.
However it prevents receiving a negative co-ordinate, which might happen
in the mount event happens out-side the pane which has grabbed the
mouse.
So instead of a negative number, use MAX_INT to say "don't change".
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 18 Jul 2023 10:55:12 +0000 (20:55 +1000)]
lib-menu: prohibit left-shift of display.
As the menu window is sized to match the longest line, there is a risk
of a left-shift happening if the cursor ever ends up at the end of that
line.
That would be bad, so explicitly disable left-shift.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Mon, 17 Jul 2023 11:27:30 +0000 (21:27 +1000)]
lib-abbrev: fix positioning of menu
The xy location of the menu must be relative to the parent of the menu.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sun, 16 Jul 2023 11:57:18 +0000 (21:57 +1000)]
do_char_byte: pass the pane to DOC_NEXT, not doc_data
If we pass the pane, the inline code is more generic and does not need
to know about the internals of struct pane.
This is a constant offset from the doc_data, so does not change the
number of memory accesses.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sat, 15 Jul 2023 23:19:07 +0000 (09:19 +1000)]
doc-docs: switch to doc_data and do_char_byte()
Use embedded doc in pane, and use common code for doc:char handler.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sat, 15 Jul 2023 21:53:13 +0000 (07:53 +1000)]
Simplify some doc:char handlers.
Create a shared inline function that does the bulk of the work of a
'doc:char' function and only needs to be given next and prev functions
which update the doc_ref and report the character.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sat, 15 Jul 2023 21:20:35 +0000 (07:20 +1000)]
doc-text fix text_next for bytes
I was completely ignoring 'bytes' for text_next.
Consequently the 'hex' test, which display bytes, was all wrong.
Also simplify text_prev using denormalise
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 12 Jul 2023 22:10:25 +0000 (08:10 +1000)]
Fix return of Action
If Action doesn't find an action tag it must return Efallthrough so some
other pane has a change to handle K:Enter
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 12 Jul 2023 21:18:52 +0000 (07:18 +1000)]
notmuch: remove support for saved: synonym for query:
Before notmuch supported query: I was handling saved:.
For a while I've supported both, but that adds no value.
So get rid of all saved: search terms and saved. config entries.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 12 Jul 2023 21:13:41 +0000 (07:13 +1000)]
notmuch: support mouse-click to select search and thread
mouse-click on search name will select that search.
mouse-click on thread subject will select that thread,
or message within a thread (I think... that last one is a bit weird).
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 12 Jul 2023 06:42:15 +0000 (16:42 +1000)]
Update copyright dates.
Gotta keep those dates accurate :-)
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 12 Jul 2023 06:37:03 +0000 (16:37 +1000)]
Add lib-askpass
AskPass will as for a password and not display what is entered.
A new script "el-askpass" is provided that ssh can use to ask for a
password through edlib.
lib-shellcmd sets the environment so this script is used.
Net result is that if a command run from edlib needs ssh to ask for a
password, it can.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Wed, 12 Jul 2023 00:20:42 +0000 (10:20 +1000)]
lib-server: separate out choose_pane functionality
Create function to choose the display and pane on which to place the popup
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 11 Jul 2023 22:23:06 +0000 (08:23 +1000)]
Add a "bin" type for xdg-find-edlib-file
This searches $PATH after looking the a "bin" dir near the lib that the
code was loaded from.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 11 Jul 2023 22:14:42 +0000 (08:14 +1000)]
Make a "bin" directory
"bin" will hold program that can be run.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 11 Jul 2023 11:40:29 +0000 (21:40 +1000)]
server: split client and server code more cleanly.
Have all server code together, and all client code too.
Also differentiate based on argv[0] - it seems a little cleaner.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 11 Jul 2023 11:33:21 +0000 (21:33 +1000)]
lib-server: various clean-ups.
- Use '\0' to separate arg and env, rather than space.
- Use arg consistently - not ':' etc.
- Use simpler names for commands, don't try to mimic internal messages.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Mon, 10 Jul 2023 05:17:44 +0000 (15:17 +1000)]
autospell: provide drop-down menu on spelling errors.
Multiple enhancement to make menus work as drop-downs triggered by a
mouse action. Still some problems.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Sat, 8 Jul 2023 02:42:51 +0000 (12:42 +1000)]
Revise how location-sensitive actions are managed.
To create a location-sensitive action, the attribute "action-FOO" must
be set to a command name, for some value of FOO.
Currently only "activate" is effective, and this send on a mouse click.
In the future "menu" may be added, and possibly others such as for
drag-and-drop.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 7 Jul 2023 22:21:27 +0000 (08:21 +1000)]
render-lines: update lines/cols earlier
Instead of only updaes lines/cols during the final render, update them
when choosing the range of lines to display.
This makes them available to interested parties earlier.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 7 Jul 2023 04:18:29 +0000 (14:18 +1000)]
Initial menu support.
We can now place a menu and receive a selection.
This is demonstrated with lib-abbrev which pops up a menu showing the
options to choose between.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Fri, 7 Jul 2023 03:13:11 +0000 (13:13 +1000)]
Track and report actual displayed size
render:reposition messages now contain more accurate columns
information, and are generated whenever it is updated.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 4 Jul 2023 05:35:45 +0000 (15:35 +1000)]
display-xcb: switch to embedded data
display-xcb pane now uses embedded data.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 4 Jul 2023 05:31:02 +0000 (15:31 +1000)]
display-ncurses - switch to embedded data.
Ncurses now uses embedded data in pane
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 4 Jul 2023 05:25:25 +0000 (15:25 +1000)]
core-window: use embedded data
core-window data is now embedded.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 4 Jul 2023 05:22:46 +0000 (15:22 +1000)]
doc-text - use embedded data in pane
The doc-text pane now embeds the data
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 4 Jul 2023 04:57:00 +0000 (14:57 +1000)]
multipart - use embedded data
doc-multipart now used embedded data.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 4 Jul 2023 04:41:31 +0000 (14:41 +1000)]
doc-list: use embedded data
doc-list panes now embed the data.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 4 Jul 2023 04:29:56 +0000 (14:29 +1000)]
doc-dir: switch to embedded data
the pane or doc-dir now embeds the data.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 4 Jul 2023 04:16:56 +0000 (14:16 +1000)]
log: switch to embedding data in pane
log panes now have data embedded.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 4 Jul 2023 03:58:17 +0000 (13:58 +1000)]
core-editor: embed ed_info in the struct pane
This makes all content of ed_info just one pointer dereference away from
any pane. We can start putting content that is current global, into
ed_info.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Tue, 4 Jul 2023 03:14:15 +0000 (13:14 +1000)]
Support inline pane data.
If a NULL data pointer is passed to __pane_register(), then a larger
memory allocation will be made to hold both the pane and the data.
If a type is defined with PANE_DATA_TYPE then that will be the size
passed to __pane_register by pane_register().
Similarly DOC_DATA_TYPE can give a type for a document. The "struct
doc" must appear first in this type.
If PANE_DATA_TYPE is defined, then "core-pane.h" must be included after
the type has been declared, which will usually be after "core.h" is included.
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Mon, 3 Jul 2023 22:38:09 +0000 (08:38 +1000)]
Always handle pane_register failure immediately.
Rather then
p = pane_register();
if (p)
....
Use
p = pane_register();
if (!p)
return FAIL
...
Signed-off-by: NeilBrown <neil@brown.name>
NeilBrown [Mon, 3 Jul 2023 22:30:28 +0000 (08:30 +1000)]
Include some include files where there are needed in include files.
This makes it easier to move includes around in .c files.
Signed-off-by: NeilBrown <neil@brown.name>