a4.0.2 ready to go

This commit is contained in:
Allen Webster 2016-03-24 11:00:13 -04:00
parent fb57a515c9
commit 216c597df3
5 changed files with 90 additions and 62 deletions

View File

@ -385,7 +385,7 @@ struct Application_Links;
#define GET_USER_INPUT_SIG(n) User_Input n(Application_Links *app, unsigned int get_type, unsigned int abort_type) #define GET_USER_INPUT_SIG(n) User_Input n(Application_Links *app, unsigned int get_type, unsigned int abort_type)
#define GET_COMMAND_INPUT_SIG(n) User_Input n(Application_Links *app) #define GET_COMMAND_INPUT_SIG(n) User_Input n(Application_Links *app)
// Queries // Queries and information display
#define START_QUERY_BAR_SIG(n) int n(Application_Links *app, Query_Bar *bar, unsigned int flags) #define START_QUERY_BAR_SIG(n) int n(Application_Links *app, Query_Bar *bar, unsigned int flags)
#define END_QUERY_BAR_SIG(n) void n(Application_Links *app, Query_Bar *bar, unsigned int flags) #define END_QUERY_BAR_SIG(n) void n(Application_Links *app, Query_Bar *bar, unsigned int flags)
#define PRINT_MESSAGE_SIG(n) void n(Application_Links *app, char *string, int len) #define PRINT_MESSAGE_SIG(n) void n(Application_Links *app, char *string, int len)

View File

@ -241,15 +241,17 @@ isearch(Application_Links *app, int start_reversed){
User_Input in; User_Input in;
Query_Bar bar; Query_Bar bar;
view = app->get_active_view(app);
buffer = app->get_buffer(app, view.locked_buffer_id);
if (!buffer.exists) return;
if (app->start_query_bar(app, &bar, 0) == 0) return; if (app->start_query_bar(app, &bar, 0) == 0) return;
Range match; Range match;
int reverse = start_reversed; int reverse = start_reversed;
int pos; int pos;
view = app->get_active_view(app);
buffer = app->get_buffer(app, view.buffer_id);
pos = view.cursor.pos; pos = view.cursor.pos;
match = make_range(pos, pos); match = make_range(pos, pos);

View File

@ -1,4 +1,4 @@
Distribution Date: 07.03.2016 (dd.mm.yyyy) Distribution Date: 24.03.2016 (dd.mm.yyyy)
Thank you for contributing to the 4coder project! Thank you for contributing to the 4coder project!
@ -27,6 +27,18 @@ if you start digging and pressing hard enough.
INSTRUCTIONS FOR USE INSTRUCTIONS FOR USE
----------------------------------------------------- -----------------------------------------------------
****Changes in 4.0.2****
The previous file limit of 128 has been raised to something over 8 million.
A *messages* buffer is now opened on launch to provide some information about
new features and messages will be posted there to report events sometimes.
subst and link directories no longer confuse the system, it treats them as one file.
on the command line: -f <N> sets the font size, the default is 16
ctrl + e: centers the view on the cursor
****Changes in 4.0.0**** ****Changes in 4.0.0****
alt + x: changed to arbitrary command (NOW WORKS ANYWHERE!) alt + x: changed to arbitrary command (NOW WORKS ANYWHERE!)
Opens a command prompt from which you can execute: Opens a command prompt from which you can execute:

View File

@ -1,4 +1,4 @@
Distribution Date: 07.03.2016 (dd.mm.yyyy) Distribution Date: 24.03.2016 (dd.mm.yyyy)
Thank you for contributing to the 4coder project! Thank you for contributing to the 4coder project!
@ -22,56 +22,24 @@ updates may deeply break your code.
SOME DOCUMENTATION SOME DOCUMENTATION
------------------------------------- -------------------------------------
See comments in 4coder_custom.cpp for more detailed information. See comments in 4coder_default_bindings.cpp for more detailed information.
Functions to implement (optional in the dll, but required if you are using buildsuper.bat): Functions to implement (optional in the dll, but required if you are using buildsuper.bat):
get_bindings get_bindings
NEW IN 4.0.0: NEW IN 4.0.2:
================ ================
File_View_Summary becomes View_Summary: #include "4coder_default.cpp" at the top of your own file to get a lot of the default functions
There use to be a lot of different view types and only "file views" were exposed in the API. such as incremental search, various word boundry seeks, and so on.
As of alpha 4 there are only views and you can always get a view.
Besides renaming the struct, there is also a change in the meaning of the "buffer_id" field. app->buffer_seek_string_insensitive(app, &buffer, start, str, len, seek_forward, &out);
A view can have a buffer attached, but not currently be looking at that file. Exactly the same as app->buffer_seek_string, but the matching rule is case insensitive
All of the following indicate the buffer associated with the view: app->get_command_input(app);
buffer_id Returns a User_Input that represents the input event that triggered the current command.
locked_buffer_id
hidden_buffer_id
These ids are nulled out to indicate that access at a particular level is not available. app->print_message(app, str, len);
buffer_id - Put a string into the *message* buffer.
This is null if the file is not visible in the view OR if the view is locked.
A view is only locked right now for read only buffers (compilation output).
locked_buffer_id -
This is null only if the file is not visible.
hidden_buffer_id -
This is never null.
In normal circumstances you can just use buffer_id and your code will automatically do
nothing when you try to edit a buffer you should not.
If what you are writing is unusual and it SHOULD edit a buffer even if it is locked or
hidden, then you can use the other ids to get deeper access.
================
Theme changing API
app->change_theme(app, name, len)
Set the theme to one of the prebuilt themes by name.
app->change_font(app, name, len)
Set the font to one of the fonts by name (not by ttf file name, by the name in the list).
app->set_theme_colors(app, colors, count)
Set colors of the current theme by tag color pairs.
================
The scrolling interpolation rule is now exposed in the API, and there is an example
OLD API DOC: OLD API DOC:
================================================================ ================================================================
@ -204,6 +172,36 @@ the change in the buffer caused by this edit.
The function returns 1 on success and 0 on failure. The function returns 1 on success and 0 on failure.
================
View_Summary:
There use to be a lot of different view types and only "file views" were exposed in the API.
As of alpha 4 there are only views and you can always get a view.
Besides renaming the struct, there is also a change in the meaning of the "buffer_id" field.
A view can have a buffer attached, but not currently be looking at that file.
All of the following indicate the buffer associated with the view:
buffer_id
locked_buffer_id
hidden_buffer_id
These ids are nulled out to indicate that access at a particular level is not available.
buffer_id -
This is null if the file is not visible in the view OR if the view is locked.
A view is only locked right now for read only buffers (compilation output).
locked_buffer_id -
This is null only if the file is not visible.
hidden_buffer_id -
This is never null.
In normal circumstances you can just use buffer_id and your code will automatically do
nothing when you try to edit a buffer you should not.
If what you are writing is unusual and it SHOULD edit a buffer even if it is locked or
hidden, then you can use the other ids to get deeper access.
================ ================
app->get_view_first(app); app->get_view_first(app);
app->get_view_next(app, &view); app->get_view_next(app, &view);
@ -364,6 +362,20 @@ Returns 1 if it successfully started a query bar.
app->end_query_bar(app, &bar); app->end_query_bar(app, &bar);
See start_query_bar for details. See start_query_bar for details.
================
Theme changing API
app->change_theme(app, name, len)
Set the theme to one of the prebuilt themes by name.
app->change_font(app, name, len)
Set the font to one of the fonts by name (not by ttf file name, by the name in the list).
app->set_theme_colors(app, colors, count)
Set colors of the current theme by tag color pairs.
Changes from 3.3 to 3.4: Changes from 3.3 to 3.4:
-exposed command word complete -exposed command word complete

View File

@ -65,15 +65,13 @@
; [X] allen's segfaults on linux launch ; [X] allen's segfaults on linux launch
; [X] open empty file bug ; [X] open empty file bug
; [X] chronal's map setting issue ; [X] chronal's map setting issue
; [X] linux save jankieness
; [] indication on failure to save ; [] indication on failure to save
; [] clean whitespace doesn't appear to be cleaning trailing whitespace anymore??? ; [] clean whitespace doesn't appear to be cleaning trailing whitespace anymore???
; [] sometimes the main cursor is not the same width as the mark cursor in the same spot ; [] sometimes the main cursor is not the same width as the mark cursor in the same spot
; [] tab character wrong width ; [] tab character wrong width
; [] bouncing when scrolling down ; [] bouncing when scrolling down
; [] miblo's off screen cursor thing ; [] miblo's off screen cursor thing
;
; [] linux save jankieness
;
; ;
; ;
@ -103,16 +101,16 @@
; ;
; [] file status in custom API ; [] file status in custom API
; [] user file bar string ; [] user file bar string
; [] simple multi-line ; [] simple multi-line editing
; ; [] allow for arbitrary wrap positions independent of view width
; [] command meta data ; [] word level wrapping ~ temporary measure really want to have totally formatted code
; [] manipulate scroll starget API
; [] error parsing and jump to error
; [] additional hooks ; [] additional hooks
; [X] new file ; [X] new file
; [] file out of sync ; [] file out of sync
; [] double binding warnings ; [] double binding warnings
; [] kill rect ; [] kill rect
;
; [] manipulate scroll starget API
; ;
; search related tech ; search related tech
; [X] replace word (incremental and/or in range) ; [X] replace word (incremental and/or in range)
@ -133,16 +131,20 @@
; [] theme switch per panel? ; [] theme switch per panel?
; [] allow multiple font faces with effects ; [] allow multiple font faces with effects
; ;
; [] control schemes ; control schemes
; [] emacs style sub-maps ; [] emacs style sub-maps
; [] vim style modes ; [] vim style modes
; [] "tap typing" ; [] "tap typing"
; [] "thin cursor" ; [] "thin cursor"
; [] command meta data
; [] macros
; ;
; [] switch over to gap buffer ; code engine
; [] lexer with multiple chunk input ; [] lexer with multiple chunk input
; ; [] switch over to gap buffer
; [] macros ; [] more correct auto-indentation
; [] preprocessor
; [] AST generator
; ;
; [] cuber's return to previous buffer idea ; [] cuber's return to previous buffer idea
; [] miblo's various number editors ; [] miblo's various number editors
@ -156,7 +158,7 @@
; [] polish for hot directories ; [] polish for hot directories
; [] undo groups ; [] undo groups
; ;
; [] "virtual text" ; "virtual text"
; [] line numbers ; [] line numbers
; [] macro expansion ; [] macro expansion
; [] error text at line ; [] error text at line