teditor
1.8.0@@fee5e94
Terminal based editor written in C++
|
Go to the documentation of this file.
32 const Cell&
at(
int x,
int y)
const {
return cells[y*width+x]; }
33 Cell&
at(
int x,
int y) {
return cells[y*width+x]; }
34 unsigned w()
const {
return (
unsigned)width; }
35 unsigned h()
const {
return (
unsigned)height; }
39 std::vector<Cell> cells;
Definition: cell_buffer.h:13
#define MESSAGE(ed, fmt,...)
Definition: logger.h:50
void copy(const Cell &from)
Definition: cell_buffer.cpp:11
void clear(AttrColor fg, AttrColor bg)
Definition: cell_buffer.cpp:40
bool getBool() const
Definition: option.h:39
Cell & at(int x, int y)
Definition: cell_buffer.h:33
Chr ch
Definition: cell_buffer.h:14
uint32_t Chr
Definition: cell_buffer.h:10
#define CMBAR_MSG(ed, fmt,...)
Definition: logger.h:52
void set(Chr c, AttrColor f, AttrColor b)
Definition: cell_buffer.cpp:17
AttrColor bg
Definition: cell_buffer.h:15
CellBuffer(int w=0, int h=0)
Definition: cell_buffer.cpp:37
CmdStatus check_output(const std::string &cmd)
Definition: utils.cpp:110
Ken-Thompson NFA as described here: https://swtch.com/~rsc/regexp/regexp1.html but adjusted to work w...
Definition: nfa.h:23
AttrColor fg
Definition: cell_buffer.h:15
#define DEF_OP()
Definition: command.h:55
void resize(int w, int h)
Definition: cell_buffer.cpp:47
const Cell & at(int x, int y) const
Definition: cell_buffer.h:32
DEF_CMD(CommandUndo, "command-undo", "buffer_ops", DEF_OP() { if(!ed.getBuff().undo()) CMBAR_MSG(ed, "No further undo information\n");})
Buffer & getBuff()
Definition: editor.h:28
unsigned w() const
Definition: cell_buffer.h:34
int width() const
Definition: cell_buffer.cpp:29
bool operator==(const Cell &a, const Cell &b)
Definition: cell_buffer.cpp:33
unsigned h() const
Definition: cell_buffer.h:35
Definition: cell_buffer.h:27
static Option & get(const std::string &n)
Definition: option.cpp:40
void keepRemoveLines(Editor &ed, bool keep)
Definition: buffer_ops.cpp:279
std::string downloadUrlToString(const std::string &url, const std::string &dnldProg, const std::string &dnldProgOpts)
Download the content of input url into a string.
Definition: utils.cpp:187
std::string prompt(const std::string &msg, KeyCmdMap *kcMap=nullptr, Choices *choices=nullptr, const std::string &defVal=std::string())
Definition: editor.cpp:413
uint16_t color_t
Definition: colors.h:11