Commit Graph

27 Commits

Author SHA1 Message Date
869cb187b6 Migrated code from std::old_io to std::io 2015-03-15 16:03:23 -07:00
ada003b346 Split rope implementation off into external lib "Ropey".
Ropey can be found at https://github.com/cessen/ropey
2015-02-25 20:05:17 -08:00
82e6fca1dd Updated code for latest rustc. 2015-02-23 20:50:55 -08:00
d3cd1c4b05 Fixed bug in Editor::move_view_to_cursor().
Was causing the view to move unecessarily when the cursor is at the end of
the buffer.
2015-02-22 20:35:41 -08:00
c532b10f22 Fixed bug in Editor::move_view_to_cursor()
It thought it was one line shorter than it actually was.
2015-02-22 20:30:33 -08:00
02f24e4e6f WIP refactor to switch over to Rope from BufferNode. 2015-02-22 11:45:57 -08:00
86f3ada8ea Small tweak to indentation style auto-detection.
Very slightly favor larger indentations, instead of very slight favor
smaller indentations.  This is more likely to do the right thing on
very small files.
2015-02-16 22:06:48 -08:00
902d93e957 Line numbers are now displayed in left-hand gutter. 2015-02-08 19:17:48 -08:00
2d50906f43 Moved the rest of file loading/saving into Buffer. 2015-02-07 23:35:25 -08:00
8d76e3fb17 View scrolling seems to work properly now. 2015-02-07 23:14:56 -08:00
8f94b32953 Have view scrolling nearly working again.
Just doesn't *quite* work with wrapped lines.  Need to investigate.
2015-02-07 22:57:25 -08:00
870818fec8 Cursor movement appears to be working properly again. 2015-02-07 22:07:48 -08:00
26965417f3 WOrking on getting cursor movement working again. 2015-02-07 19:46:08 -08:00
e9c06615f9 Silenced some compiler warnings. 2015-02-07 00:52:52 -08:00
3ae51f7f7e Formatters are now primarily factories for iterators.
This is a big shift in the formatter API's.  It simplifies the
responsibilities of the implementers so that pretty much all they
have to do it implement an iterator.  Everything else will be
automatically derived from that.  (Or, at least, that's the hope.)
2015-02-06 23:58:19 -08:00
8319033ae5 First step in pulling formatters out of the text buffer.
This commit pulls the formatter out of the text buffer and
puts it in the editor instead.  However, there is a lot of
commented code utlizing the buffer and formatter that still
needs to be updated.

In short, the editor is pretty non-functional in this commit.
2015-02-06 19:47:52 -08:00
e29777e33c Improved file loading.
File loading is now the responsibility of the Buffer, which allows
it to do some weird internal stuff to make it faster.

Also, using custom code for scanning the text, so all line endings
are handled now, not just LF and CRLF.
2015-02-01 23:17:43 -08:00
c9d09f6f98 Moved line_ending_type out of Buffer and into Editor. 2015-01-31 15:06:04 -08:00
8701ebbba7 Tweaked code to avoid warnings from latest rustc compiler. 2015-01-29 21:03:56 -08:00
f222cd6a54 Fixed remaining cursor navigation bugs (I think...?). 2015-01-27 23:58:45 -08:00
83fa6a72cb Tabs working again. 2015-01-25 22:07:06 -08:00
109e46a027 WIP: moving GUI code over to use LineFormatter. 2015-01-25 14:00:45 -08:00
0557f5f6ce Reorganized the code a bit, and started updating unit tests. 2015-01-25 13:20:16 -08:00
518b9a7e42 Console editor appears to be back up to snuff again! 2015-01-24 21:38:13 -08:00
4caad17e56 Console drawing is almost back up to snuff.
Just missing drawing the cursors if it's at the end of the text buffer.
2015-01-24 21:00:30 -08:00
c69ebc240f WIP: making Buffers so they can be given LineFormatters.
A LineFormatter determines how a line of text is visually displayed in
2d space.  This allows both the Console and GUI version of the editor
to share the same buffer code whilst still handling the differing ways
in which both handle visual display.
2015-01-24 14:35:49 -08:00
ac784077f0 Split cursor code into separate file.
There is now a CursorSet type that handles multiple cursors, and makes
it convenient to maintain the necessary invariants expected by the rest
of the code for multi-cursor editing.
2015-01-18 15:11:49 -08:00