diff options
author | 2009-03-01 16:32:59 -0500 | |
---|---|---|
committer | 2009-03-01 16:32:59 -0500 | |
commit | 5919fc6b3a124f215c50bf1d187b37dad5a37858 (patch) | |
tree | e71e49a5b34f83945de48b0d255ea6c133ed3e63 /core/.buffer.lua | |
parent | c2c910627f6b8dc4bd638d2d83b3dcf83d92b857 (diff) | |
download | textadept-5919fc6b3a124f215c50bf1d187b37dad5a37858.tar.gz textadept-5919fc6b3a124f215c50bf1d187b37dad5a37858.zip |
Added support for multiple character encodings through g_convert().
Can open, save, and convert between different character encodings now.
Diffstat (limited to 'core/.buffer.lua')
-rw-r--r-- | core/.buffer.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/core/.buffer.lua b/core/.buffer.lua index 62672fa5..af1221b9 100644 --- a/core/.buffer.lua +++ b/core/.buffer.lua @@ -19,6 +19,9 @@ module('buffer') -- since it was last saved. -- @field filename The absolute path to the file associated with this buffer. -- It is encoded in UTF-8. Use 'textadept.iconv()' for charset conversions. +-- @field encoding The encoding of the file on the hard disk. It will be nil if +-- the file is a binary file. +-- @field encoding_bom The byte-order mark of the file encoding (if any). -- @field anchor The position of the opposite end of the selection to the -- caret. -- @field auto_c_auto_hide Flag indicating whether or not autocompletion is @@ -229,7 +232,8 @@ module('buffer') -- @field x_offset The horizontal scroll position. -- @field zoom The zoom level added to all font sizes. +: magnify, -: reduce. buffer = { - doc_pointer = nil, dirty = nil, filename = nil + doc_pointer = nil, dirty = nil, filename = nil, + encoding = nil, encoding_bom = nil, anchor = nil, auto_c_auto_hide = nil, auto_c_cancel_at_start = nil, @@ -374,10 +378,9 @@ function buffer:text_range(start_pos, end_pos) --- -- Deletes the current buffer. --- The indexed buffer must be the currently focused one. --- WARNING: this function buffer:should NOT be called via scripts. --- textadept.io provides a close() function buffer:for buffers to prompt for --- confirmation if necessary while this function buffer:does not. +-- The indexed buffer must be the currently focused one. WARNING: this function +-- should NOT be called via scripts. textadept.io provides a close() function +-- for buffers to prompt for confirmation if necessary; this function does not. -- Activates the 'buffer_deleted' signal. function buffer:delete() |